Skip to content

Commit a430473

Browse files
committed
Fix asserts after RDB load with FLASH
1 parent 5fbe991 commit a430473

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Diff for: src/db.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -2989,6 +2989,7 @@ void redisDbPersistentData::processChangesAsync(std::atomic<int> &pendingJobs)
29892989
dict *dictNew = dictCreate(&dbDictType, nullptr);
29902990
std::swap(dictNew, m_pdict);
29912991
m_cnewKeysPending = 0;
2992+
m_numexpires = 0;
29922993
g_pserver->asyncworkqueue->AddWorkFunction([dictNew, this, &pendingJobs]{
29932994
dictIterator *di = dictGetIterator(dictNew);
29942995
dictEntry *de;

Diff for: src/rdb.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -2865,6 +2865,12 @@ class rdbAsyncWorkThread
28652865

28662866
size_t endWork() {
28672867
if (!fLaunched) {
2868+
for (int idb = 0; idb < cserver.dbnum; ++idb) {
2869+
if (g_pserver->m_pstorageFactory) {
2870+
g_pserver->db[idb]->processChangesAsync(cstorageWritesInFlight);
2871+
}
2872+
}
2873+
while (cstorageWritesInFlight > 0);
28682874
return ckeysLoaded;
28692875
}
28702876
if (!vecbatch.empty()) {

0 commit comments

Comments
 (0)