summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2018-02-13 15:43:26 +0100
committerantirez <antirez@gmail.com>2018-02-13 15:43:34 +0100
commitc14ba46e3a725a2325d8d5fd90097b1c889de1e2 (patch)
tree47741737a0cbfd5606fe3a53d470ea5fcfce004e
parentf782006782c9eb82c893c12084bec1c0cf7d521e (diff)
downloadredis-c14ba46e3a725a2325d8d5fd90097b1c889de1e2.tar.gz
Make it explicit with a comment why we kill the old AOF rewrite.
See #3858.
-rw-r--r--src/aof.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/aof.c b/src/aof.c
index 276a7c08a..fdb729040 100644
--- a/src/aof.c
+++ b/src/aof.c
@@ -260,6 +260,9 @@ int startAppendOnly(void) {
server.aof_rewrite_scheduled = 1;
serverLog(LL_WARNING,"AOF was enabled but there is already a child process saving an RDB file on disk. An AOF background was scheduled to start when possible.");
} else {
+ /* If there is a pending AOF rewrite, we need to switch it off and
+ * start a new one: the old one cannot be reused becuase it is not
+ * accumulating the AOF buffer. */
if (server.aof_child_pid != -1) {
serverLog(LL_WARNING,"AOF was enabled but there is already an AOF rewriting in background. Stopping background AOF and starting a rewrite now.");
killAppendOnlyChild();