From b0935de746014490b0cc654e6c89528a5a66a49e Mon Sep 17 00:00:00 2001 From: John Sully Date: Tue, 26 Sep 2023 03:51:49 +0000 Subject: [PATCH] More fixes --- src/db.cpp | 4 ++-- src/storage/rocksdb.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/db.cpp b/src/db.cpp index 09c7b665c..013473163 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -3376,10 +3376,10 @@ void redisDbPersistentData::prefetchKeysFlash(std::unordered_set &setc) getKeysResult result = GETKEYS_RESULT_INIT; auto cmd = lookupCommand(szFromObj(command.argv[0])); if (cmd == nullptr) - return; // Bad command? It's not for us to judge, just bail + break; // Bad command? It's not for us to judge, just bail if (command.argc < std::abs(cmd->arity)) - return; // Invalid number of args + break; // Invalid number of args int numkeys = getKeysFromCommand(cmd, command.argv, command.argc, &result); bool fQueued = false; diff --git a/src/storage/rocksdb.cpp b/src/storage/rocksdb.cpp index ef2f14abb..16aed43b7 100644 --- a/src/storage/rocksdb.cpp +++ b/src/storage/rocksdb.cpp @@ -288,8 +288,10 @@ StorageToken *RocksDBStorageProvider::begin_retrieve(struct aeEventLoop *el, aeP for (size_t ikey = 0; ikey < ckey; ++ikey) { tok->mapkeydata.insert(std::make_pair(std::string(rgkey[ikey], sdslen(rgkey[ikey])), nullptr)); } - - (*m_pfactory->m_wqueue)->AddWorkFunction([this, el, callback, tok]{ + + auto opts = ReadOptions(); + opts.async_io = true; + (*m_pfactory->m_wqueue)->AddWorkFunction([this, el, callback, tok, opts]{ std::vector veckeysStr; std::vector veckeys; std::vector vecvals;