From e966264188e2bd9d09018a2b62354d5227db8b07 Mon Sep 17 00:00:00 2001 From: fayadexinqing <2418967201@qq.com> Date: Sat, 8 Aug 2020 04:01:14 +0800 Subject: [PATCH] fix migration's broadcast PONG message, after the slot modification (#7590) --- src/cluster.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cluster.c b/src/cluster.c index 8860bfc14..3bf8db9af 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -4503,6 +4503,9 @@ NULL server.cluster->migrating_slots_to[slot]) server.cluster->migrating_slots_to[slot] = NULL; + clusterDelSlot(slot); + clusterAddSlot(n,slot); + /* If this node was importing this slot, assigning the slot to * itself also clears the importing status. */ if (n == myself && @@ -4526,8 +4529,6 @@ NULL * soon as possible. */ clusterBroadcastPong(CLUSTER_BROADCAST_ALL); } - clusterDelSlot(slot); - clusterAddSlot(n,slot); } else { addReplyError(c, "Invalid CLUSTER SETSLOT action or number of arguments. Try CLUSTER HELP");