From de6f74838afbfd60a0dbe59f35dff326847e8e37 Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 4 Feb 2015 11:39:02 +0100 Subject: [PATCH] No-sync: avoid master to be marked as PRE-PSYNC. replicationCreateMasterClient() will mark it as such if we don't set a fake initial replication offset. --- src/replication.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/replication.c b/src/replication.c index 2eca16a9..9c92c208 100644 --- a/src/replication.c +++ b/src/replication.c @@ -1219,6 +1219,7 @@ int slaveTryPartialResynchronization(int fd) { /* No-sync replication. */ redisLog(REDIS_NOTICE, "No-sync slave accepted without SYNC phase."); sdsfree(reply); + server.repl_master_initial_offset = 0; replicationCreateMasterClient(fd); return PSYNC_CONTINUE; }