summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQu Chen <quchen@amazon.com>2016-08-01 12:16:17 -0700
committerantirez <antirez@gmail.com>2016-08-02 10:44:33 +0200
commitd982f443727bb226652d5c6a8320ed1962df1727 (patch)
treecee4aad9d8c3c55684c6de17007dffb4793c50ae
parent9424fe4580abdebd0329d1915601591aec33031c (diff)
downloadredis-d982f443727bb226652d5c6a8320ed1962df1727.tar.gz
Fix a bug to delay bgsave while AOF rewrite in progress for replication
-rw-r--r--src/replication.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/replication.c b/src/replication.c
index 471ad1a03..fb96fac1b 100644
--- a/src/replication.c
+++ b/src/replication.c
@@ -676,7 +676,7 @@ void syncCommand(client *c) {
/* Target is disk (or the slave is not capable of supporting
* diskless replication) and we don't have a BGSAVE in progress,
* let's start one. */
- if (server.aof_child_pid != -1) {
+ if (server.aof_child_pid == -1) {
startBgsaveForReplication(c->slave_capa);
} else {
serverLog(LL_NOTICE,