提交 abd6308d 编写于 作者: A antirez

Set server.repl_down_since to 0 when changing master.

When an instance is potentially set to replicate with another master, it
is conceptually disconnected forever, since we have no old copy of the
dataset for this master in memory.
上级 36c24bcc
......@@ -1261,6 +1261,7 @@ void replicationSetMaster(char *ip, int port) {
cancelReplicationHandshake();
server.repl_state = REDIS_REPL_CONNECT;
server.master_repl_offset = 0;
server.repl_down_since = 0;
}
/* Cancel replication, setting the instance as a master itself. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册