stopAppendOnly resets aof_rewrite_scheduled

althouh in theory, users can do BGREWRITEAOF even if aof is disabled, i
suppose it is more common that the scheduled flag is set by either
startAppendOnly, of a failed initial AOFRW fork (AOF_WAIT_REWRITE)
This commit is contained in:
Oran Agra 2020-02-06 10:17:34 +02:00
parent 44ac202fbf
commit 69e8ea7143

View File

@ -242,6 +242,7 @@ void stopAppendOnly(void) {
server.aof_fd = -1;
server.aof_selected_db = -1;
server.aof_state = AOF_OFF;
server.aof_rewrite_scheduled = 0;
killAppendOnlyChild();
}