Skip to content

Commit

Permalink
Fix crossslot error migrating batches of keys
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnSully authored and John Sully committed Sep 26, 2023
1 parent 596c513 commit 025b707
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5993,7 +5993,7 @@ clusterNode *getNodeByQuery(client *c, struct redisCommand *cmd, robj **argv, in
if (!equalStringObjects(firstkey,thiskey)) {
clusterNode* nThisKey = g_pserver->cluster->slots[slot];

if (nThisKey != n || migrating_slot || importing_slot || g_pserver->cluster->migrating_slots_to[slot] != nullptr || g_pserver->cluster->importing_slots_from[slot] != nullptr) {
if ((slot != thisslot) && (nThisKey != n || migrating_slot || importing_slot || g_pserver->cluster->migrating_slots_to[slot] != nullptr || g_pserver->cluster->importing_slots_from[slot] != nullptr)) {
/* Error: multiple keys from different slots. */
getKeysFreeResult(&result);
if (error_code)
Expand Down

0 comments on commit 025b707

Please sign in to comment.