Clear the importing status from the slot if a CLUSTER SETSLOT command permanently assigns the slot to the importing node.

This commit is contained in:
antirez 2011-09-30 19:20:56 +02:00
parent 6c0047c430
commit c5954c1966

View File

@ -1305,6 +1305,11 @@ void clusterCommand(redisClient *c) {
server.cluster.migrating_slots_to[slot])
server.cluster.migrating_slots_to[slot] = NULL;
/* If this node was importing this slot, assigning the slot to
* itself also clears the importing status. */
if (n == server.cluster.myself && server.cluster.importing_slots_from[slot])
server.cluster.importing_slots_from[slot] = NULL;
clusterDelSlot(slot);
clusterAddSlot(n,slot);
} else {