Skip to content

Commit

Permalink
Fix delKeysInSlot does not consider command invoke.
Browse files Browse the repository at this point in the history
Signed-off-by: wuranxx <[email protected]>
  • Loading branch information
wuranxx committed Jan 22, 2025
1 parent da2ab1a commit 4db74af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cluster_legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -6345,6 +6345,7 @@ unsigned int delKeysInSlot(unsigned int hashslot, int lazy) {
* state so that we don't assert in propagateNow(). */
server.server_del_keys_in_slot = 1;
unsigned int j = 0;
int before_execution_nesting = server.execution_nesting;

kvstoreHashtableIterator *kvs_di = NULL;
void *next;
Expand All @@ -6359,6 +6360,7 @@ unsigned int delKeysInSlot(unsigned int hashslot, int lazy) {
} else {
dbSyncDelete(&server.db[0], key);
}
dbDelete(&server.db[0], key);
propagateDeletion(&server.db[0], key, lazy);
signalModifiedKey(NULL, &server.db[0], key);
/* The keys are not actually logically deleted from the database, just moved to another node.
Expand All @@ -6374,7 +6376,7 @@ unsigned int delKeysInSlot(unsigned int hashslot, int lazy) {
kvstoreReleaseHashtableIterator(kvs_di);

server.server_del_keys_in_slot = 0;
serverAssert(server.execution_nesting == 0);
serverAssert(server.execution_nesting == before_execution_nesting);
return j;
}

Expand Down

0 comments on commit 4db74af

Please sign in to comment.