summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-08-05 11:23:22 +0200
committerantirez <antirez@gmail.com>2015-08-05 14:00:15 +0200
commitb2ff48ef1939bb38b05e01efd0f6530580b3b119 (patch)
tree49c17b28cce3b57f3b0b7ec79efdaba7b45c231c
parent7967f1bca60d978e0f56fa01721f15eb4ce15411 (diff)
downloadredis-b2ff48ef1939bb38b05e01efd0f6530580b3b119.tar.gz
Don't send SELECT to slaves in WAIT_BGSAVE_START state.
-rw-r--r--src/replication.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/replication.c b/src/replication.c
index 6b85e1686..9aa0ae89b 100644
--- a/src/replication.c
+++ b/src/replication.c
@@ -201,6 +201,7 @@ void replicationFeedSlaves(list *slaves, int dictid, robj **argv, int argc) {
listRewind(slaves,&li);
while((ln = listNext(&li))) {
redisClient *slave = ln->value;
+ if (slave->replstate == REDIS_REPL_WAIT_BGSAVE_START) continue;
addReply(slave,selectcmd);
}