Commit 9465d83e authored by antirez's avatar antirez
Browse files

A node can populate a slot if a message from a trusted slot is received...

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.
parent dbf6bca4
...@@ -637,7 +637,7 @@ int clusterProcessPacket(clusterLink *link) { ...@@ -637,7 +637,7 @@ int clusterProcessPacket(clusterLink *link) {
if (server.cluster.slots[j] == NULL || if (server.cluster.slots[j] == NULL ||
server.cluster.slots[j]->flags & REDIS_NODE_FAIL) server.cluster.slots[j]->flags & REDIS_NODE_FAIL)
{ {
clusterAddSlot(sender,j); server.cluster.slots[j] = sender;
update_state = update_config = 1; update_state = update_config = 1;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment