Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnSully committed Sep 26, 2023
1 parent 71b92e7 commit b0935de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3376,10 +3376,10 @@ void redisDbPersistentData::prefetchKeysFlash(std::unordered_set<client*> &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;
Expand Down
6 changes: 4 additions & 2 deletions src/storage/rocksdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string> veckeysStr;
std::vector<rocksdb::Slice> veckeys;
std::vector<rocksdb::PinnableSlice> vecvals;
Expand Down

0 comments on commit b0935de

Please sign in to comment.