Skip to content

Commit

Permalink
Clear owner_not_claiming_slot bit for the slot in clusterDelSlot (red…
Browse files Browse the repository at this point in the history
…is#12564)

Clear owner_not_claiming_slot bit for the slot in clusterDelSlot to keep it
consistent with slot ownership information.

(cherry picked from commit 8cdeddc)
  • Loading branch information
srgsanky authored and oranagra committed Jan 7, 2024
1 parent 83ed8a8 commit d836bdf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cluster.c
Expand Up @@ -2411,7 +2411,6 @@ void clusterUpdateSlotsConfigWith(clusterNode *sender, uint64_t senderConfigEpoc
}
clusterDelSlot(j);
clusterAddSlot(sender,j);
bitmapClearBit(server.cluster->owner_not_claiming_slot, j);
clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG|
CLUSTER_TODO_UPDATE_STATE|
CLUSTER_TODO_FSYNC_CONFIG);
Expand Down Expand Up @@ -4942,6 +4941,8 @@ int clusterDelSlot(int slot) {
/* Clear the slot bit. */
serverAssert(clusterNodeClearSlotBit(n,slot) == 1);
server.cluster->slots[slot] = NULL;
/* Make owner_not_claiming_slot flag consistent with slot ownership information. */
bitmapClearBit(server.cluster->owner_not_claiming_slot, slot);
return C_OK;
}

Expand Down

0 comments on commit d836bdf

Please sign in to comment.