Skip to content

Commit

Permalink
Fix bug where we erroneously answer queries belonging to another shard
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnSully committed Sep 27, 2023
1 parent 025b707 commit e7f90f0
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 @@ -5991,7 +5991,7 @@ clusterNode *getNodeByQuery(client *c, struct redisCommand *cmd, robj **argv, in
/* If it is not the first key, make sure it is exactly
* the same key as the first we saw. */
if (!equalStringObjects(firstkey,thiskey)) {
clusterNode* nThisKey = g_pserver->cluster->slots[slot];
clusterNode* nThisKey = g_pserver->cluster->slots[thisslot];

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. */
Expand Down

0 comments on commit e7f90f0

Please sign in to comment.