From a3755ae9ee6391b0ebb6fa0a26e0f38f00574654 Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 10 Feb 2014 18:04:43 +0100 Subject: [PATCH] Cluster: ignore slot config changes if we are importing it. --- src/cluster.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cluster.c b/src/cluster.c index 651063d2..88c927d5 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -1112,8 +1112,10 @@ void clusterUpdateSlotsConfigWith(clusterNode *sender, uint64_t senderConfigEpoc if (bitmapTestBit(slots,j)) { /* We rebind the slot to the new node claiming it if: * 1) The slot was unassigned. - * 2) The new node claims it with a greater configEpoch. */ - if (server.cluster->slots[j] == sender) continue; + * 2) The new node claims it with a greater configEpoch. + * 3) We are not currently importing the slot. */ + if (server.cluster->slots[j] == sender || + server.cluster->importing_slots_from[j]) continue; if (server.cluster->slots[j] == NULL || server.cluster->slots[j]->configEpoch < senderConfigEpoch) {