From 9465d83efd8afa5f6c99486e0b9a232b6f25d31b Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 5 Oct 2011 17:40:02 +0200 Subject: [PATCH] A node can populate a slot if a message from a trusted slot is received claiming ownership of this slot, that is currently empty or served by a node in FAIL state. However this feature was broken since calling clusterAddSlot() was not enough as the slot bit is already set in the node that pong us. We need to directly alter the table. This commit fixes the issue. --- src/cluster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cluster.c b/src/cluster.c index ba664884..21528433 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -637,7 +637,7 @@ int clusterProcessPacket(clusterLink *link) { if (server.cluster.slots[j] == NULL || server.cluster.slots[j]->flags & REDIS_NODE_FAIL) { - clusterAddSlot(sender,j); + server.cluster.slots[j] = sender; update_state = update_config = 1; } }