Skip to content

Commit

Permalink
Fix asserts after RDB load with FLASH
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnSully committed Mar 19, 2024
1 parent 5fbe991 commit a430473
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2989,6 +2989,7 @@ void redisDbPersistentData::processChangesAsync(std::atomic<int> &pendingJobs)
dict *dictNew = dictCreate(&dbDictType, nullptr);
std::swap(dictNew, m_pdict);
m_cnewKeysPending = 0;
m_numexpires = 0;
g_pserver->asyncworkqueue->AddWorkFunction([dictNew, this, &pendingJobs]{
dictIterator *di = dictGetIterator(dictNew);
dictEntry *de;
Expand Down
6 changes: 6 additions & 0 deletions src/rdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2865,6 +2865,12 @@ class rdbAsyncWorkThread

size_t endWork() {
if (!fLaunched) {
for (int idb = 0; idb < cserver.dbnum; ++idb) {
if (g_pserver->m_pstorageFactory) {
g_pserver->db[idb]->processChangesAsync(cstorageWritesInFlight);
}
}
while (cstorageWritesInFlight > 0);
return ckeysLoaded;
}
if (!vecbatch.empty()) {
Expand Down

0 comments on commit a430473

Please sign in to comment.