From 4faad81f50f044b1ed92daae58e1e01e23c864fc Mon Sep 17 00:00:00 2001 From: fayadexinqing <2418967201@qq.com> Date: Thu, 30 Jul 2020 09:05:27 +0800 Subject: [PATCH] broadcast a PONG message when slot's migration is over, which may reduce the moved request of clients (#7571) --- src/cluster.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cluster.c b/src/cluster.c index 350aa7b6a..8860bfc14 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -4522,6 +4522,9 @@ NULL "configEpoch updated after importing slot %d", slot); } server.cluster->importing_slots_from[slot] = NULL; + /* After importing this slot, let the other nodes know as + * soon as possible. */ + clusterBroadcastPong(CLUSTER_BROADCAST_ALL); } clusterDelSlot(slot); clusterAddSlot(n,slot);