From 885d99f830d6f6642432c9481f8ccd2ede9c0d73 Mon Sep 17 00:00:00 2001 From: Gustavo Toyota Date: Thu, 15 Dec 2022 16:09:53 -0400 Subject: [PATCH] fix: make autopipelining group commands by slot instead of by node --- lib/autoPipelining.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/autoPipelining.ts b/lib/autoPipelining.ts index 410507f7..8fbe5ee7 100644 --- a/lib/autoPipelining.ts +++ b/lib/autoPipelining.ts @@ -146,9 +146,7 @@ export function executeWithAutoPipelining( // ioredis will only flatten one level of the array, in the Command constructor. const prefix = client.options.keyPrefix || ""; const slotKey = client.isCluster - ? client.slots[ - calculateSlot(`${prefix}${getFirstValueInFlattenedArray(args)}`) - ].join(",") + ? calculateSlot(`${prefix}${getFirstValueInFlattenedArray(args)}`) : "main"; if (!client._autoPipelines.has(slotKey)) {