Skip to content

Commit

Permalink
correcting classname
Browse files Browse the repository at this point in the history
  • Loading branch information
a00817524 committed Oct 30, 2023
1 parent d20c5a4 commit dc4dc2f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/storage/rocksdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,31 +257,31 @@ void RocksDBStorageProvider::endWriteBatch()

struct BatchStorageToken : public StorageToken {
std::shared_ptr<rocksdb::DB> tspdb; // Note: This must be first so it is deleted last
rocksdb::WriteBatch* tspbatch;
std::unique_ptr<rocksdb::WriteBatch> tspbatch;
~BatchStorageToken(){
tspdb.reset();
tspdb = nullptr;
tspbatch = nullptr;
}
};

StorageToken* RocksEncoderStorageProvider::begin_endWriteBatch(struct aeEventLoop *el, aePostFunctionTokenProc* callback)
StorageToken* RocksDBStorageProvider::begin_endWriteBatch(struct aeEventLoop *el, aePostFunctionTokenProc* callback)
{
// serverLog(LL_WARNING, "RocksEncoderStorageProvider::begin_endWriteBatch");
serverLog(LL_WARNING, "RocksDBStorageProvider::begin_endWriteBatch");
BatchStorageToken *tok = new BatchStorageToken();
tok->tspbatch = m_spbatch.get();
tok->tspbatch = std::move(m_spbatch);
tok->tspdb = m_spdb;
(*m_pfactory->m_wqueue)->AddWorkFunction([this, el,callback,tok]{
// serverAssert(db);
serverAssert(tok->tspdb);
tok->tspdb->Write(WriteOptions(),tok->tspbatch);
tok->tspdb->Write(WriteOptions(),tok->tspbatch.get());
aePostFunction(el,callback,tok);
});
m_spbatch = nullptr;
m_lock.unlock();
return tok;
}

void RocksEncoderStorageProvider::complete_endWriteBatch(StorageToken* tok){
// serverLog(LL_WARNING, "RocksEncoderStorageProvider::complete_endWriteBatch");
void RocksDBStorageProvider::complete_endWriteBatch(StorageToken* tok){
// serverLog(LL_WARNING, "RocksDBStorageProvider::complete_endWriteBatch");
m_lock.unlock();
delete tok;
tok = nullptr;
Expand Down

0 comments on commit dc4dc2f

Please sign in to comment.