summaryrefslogtreecommitdiff
path: root/src/db.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/db.c')
-rw-r--r--src/db.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/db.c b/src/db.c
index 5045935c3..4f27534fc 100644
--- a/src/db.c
+++ b/src/db.c
@@ -616,6 +616,9 @@ void flushAllDataAndResetRDB(int flags) {
rdbSave(server.rdb_filename,rsiptr);
server.dirty = saved_dirty;
}
+
+ /* Without that extra dirty++, when db was already empty, FLUSHALL will
+ * not be replicated nor put into the AOF. */
server.dirty++;
#if defined(USE_JEMALLOC)
/* jemalloc 5 doesn't release pages back to the OS when there's no traffic.