diff options
author | antirez <antirez@gmail.com> | 2020-05-25 11:47:38 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2020-05-25 11:47:38 +0200 |
commit | 92a3ff6168864673e806075528574d8b70fa20b0 (patch) | |
tree | ee6df5002f71bad0cadc5f3cf2cb7dc149db740e | |
parent | 9e055a0f1ff5730ac412a1a2c31e75b15401fe2c (diff) | |
download | redis-92a3ff6168864673e806075528574d8b70fa20b0.tar.gz |
Clarify what is happening in PR #7320.
-rw-r--r-- | src/replication.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/replication.c b/src/replication.c index d45a15783..3ebe451a2 100644 --- a/src/replication.c +++ b/src/replication.c @@ -2537,7 +2537,11 @@ void replicationUnsetMaster(void) { /* When a slave is turned into a master, the current replication ID * (that was inherited from the master at synchronization time) is * used as secondary ID up to the current offset, and a new replication - * ID is created to continue with a new replication history. */ + * ID is created to continue with a new replication history. + * + * NOTE: this function MUST be called after we call + * freeClient(server.master), since there we adjust the replication + * offset trimming the final PINGs. See Github issue #7320. */ shiftReplicationId(); /* Disconnecting all the slaves is required: we need to inform slaves * of the replication ID change (see shiftReplicationId() call). However |