From caf9b24a7d5f59be45fde702e074589af0eeec85 Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 28 Feb 2013 15:54:29 +0100 Subject: [PATCH] Cluster: don't set the slot as unassigned because of PONG info. As stated in the comment this is usually due to a resharding in progress so the client should be still redirected to the old node that will handle the redirection elsewhere. --- src/cluster.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/cluster.c b/src/cluster.c index e6a0fb41..065c4201 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -874,12 +874,10 @@ int clusterProcessPacket(clusterLink *link) { update_state = update_config = 1; } } else { - /* If this slot was served by this node, but it is - * no longer claiming it, del it from the table. */ - if (server.cluster->slots[j] == sender) { - clusterDelSlot(j); - update_state = update_config = 1; - } + /* This node claims to no longer handling the slot, + * however we don't change our config as this is likely + * happening because a resharding is in progress, and + * it already knows where to redirect clients. */ } } }