From 4818ddf4f6e2bf278af4a1c0dbc593eba95ce782 Mon Sep 17 00:00:00 2001 From: a00817524 Date: Fri, 3 Nov 2023 20:35:27 +0000 Subject: [PATCH] fixed some errors --- src/storage/rocksdb.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/storage/rocksdb.cpp b/src/storage/rocksdb.cpp index 3b7b9ec18..e4c1d45ca 100644 --- a/src/storage/rocksdb.cpp +++ b/src/storage/rocksdb.cpp @@ -257,7 +257,7 @@ void RocksDBStorageProvider::endWriteBatch() struct BatchStorageToken : public StorageToken { std::shared_ptr tspdb; // Note: This must be first so it is deleted last - std::unique_ptr tspbatch; + std::unique_ptr tspbatch; ~BatchStorageToken(){ tspdb.reset(); tspdb = nullptr; @@ -273,7 +273,7 @@ StorageToken* RocksDBStorageProvider::begin_endWriteBatch(struct aeEventLoop *el m_spbatch = nullptr; m_lock.unlock(); (*m_pfactory->m_wqueue)->AddWorkFunction([this, el,callback,tok]{ - tok->tspdb->Write(WriteOptions(),tok->tspbatch.get()); + tok->tspdb->Write(WriteOptions(),tok->tspbatch.get()->GetWriteBatch()); aePostFunction(el,callback,tok); }); @@ -322,7 +322,7 @@ StorageToken *RocksDBStorageProvider::begin_retrieve(struct aeEventLoop *el, aeP } auto opts = ReadOptions(); - opts.async_io = true; + //opts.async_io = true; (*m_pfactory->m_wqueue)->AddWorkFunction([this, el, callback, tok, opts]{ std::vector veckeysStr; std::vector veckeys; @@ -362,4 +362,4 @@ void RocksDBStorageProvider::complete_retrieve(StorageToken *tok, callbackSingle } } delete rtok; -} \ No newline at end of file +}