Skip to content

Commit

Permalink
missed changes
Browse files Browse the repository at this point in the history
  • Loading branch information
a00817524 committed Oct 31, 2023
1 parent dc4dc2f commit c77419d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/storage/rocksdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,24 +265,23 @@ struct BatchStorageToken : public StorageToken {
}
};

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

return tok;
}

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

0 comments on commit c77419d

Please sign in to comment.