From: antirez Date: Wed, 5 Oct 2011 15:40:02 +0000 (+0200) Subject: A node can populate a slot if a message from a trusted slot is received claiming... X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/9465d83efd8afa5f6c99486e0b9a232b6f25d31b?ds=inline;hp=-c 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. --- 9465d83efd8afa5f6c99486e0b9a232b6f25d31b 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; } }