From 09aef52033c0df5adced93960fed99eaffa88b19 Mon Sep 17 00:00:00 2001 From: kukey Date: Mon, 26 Apr 2021 10:43:02 +0800 Subject: [PATCH] not split aof after ha Sentinel send slaveof comamnd wrapped with mutli/exec when master/slave switch. If split aof, new aof file will filled the exec command without opinfo. --- src/replication.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/replication.c b/src/replication.c index 64c15123..50a5893f 100644 --- a/src/replication.c +++ b/src/replication.c @@ -1970,7 +1970,7 @@ void replicationSetMaster(char *ip, int port) { server.repl_down_since = 0; /* split aof after HA */ - aofSplit(1, 1); + //aofSplit(1, 1); } /* Cancel replication, setting the instance as a master itself. */ @@ -2001,7 +2001,7 @@ void replicationUnsetMaster(void) { server.slaveseldb = -1; /* split aof after HA */ - aofSplit(1, 1); + //aofSplit(1, 1); } /* This function is called when the slave lose the connection with the