Skip to content

Commit e7f90f0

Browse files
committed
Fix bug where we erroneously answer queries belonging to another shard
1 parent 025b707 commit e7f90f0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/cluster.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5991,7 +5991,7 @@ clusterNode *getNodeByQuery(client *c, struct redisCommand *cmd, robj **argv, in
59915991
/* If it is not the first key, make sure it is exactly
59925992
* the same key as the first we saw. */
59935993
if (!equalStringObjects(firstkey,thiskey)) {
5994-
clusterNode* nThisKey = g_pserver->cluster->slots[slot];
5994+
clusterNode* nThisKey = g_pserver->cluster->slots[thisslot];
59955995

59965996
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)) {
59975997
/* Error: multiple keys from different slots. */

0 commit comments

Comments
 (0)