Bug: only update global flags for sync save

Former-commit-id: f01a7cf59bf965b35e5bb23e3ecbb7265ef8942a
This commit is contained in:
John Sully 2019-11-29 22:21:17 -05:00
parent 6cb89c9aee
commit 995539a7f5

View File

@ -1339,8 +1339,9 @@ int rdbSaveFile(char *filename, const redisDbPersistentDataSnapshot **rgpdb, rdb
}
serverLog(LL_NOTICE,"DB saved on disk");
if (serverTL != nullptr)
if (!g_pserver->rdbThreadVars.fRdbThreadActive)
{
// Do this only in a synchronous save, otherwise our thread controller will update these
g_pserver->dirty = 0;
g_pserver->lastsave = time(NULL);
g_pserver->lastbgsave_status = C_OK;