Skip to content

Commit 885d99f

Browse files
committed
fix: make autopipelining group commands by slot instead of by node
1 parent 807cfc0 commit 885d99f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/autoPipelining.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,7 @@ export function executeWithAutoPipelining(
146146
// ioredis will only flatten one level of the array, in the Command constructor.
147147
const prefix = client.options.keyPrefix || "";
148148
const slotKey = client.isCluster
149-
? client.slots[
150-
calculateSlot(`${prefix}${getFirstValueInFlattenedArray(args)}`)
151-
].join(",")
149+
? calculateSlot(`${prefix}${getFirstValueInFlattenedArray(args)}`)
152150
: "main";
153151

154152
if (!client._autoPipelines.has(slotKey)) {

0 commit comments

Comments
 (0)