From d11ddf59e69ccc5eeab7c3b11e3f31be168db82c Mon Sep 17 00:00:00 2001 From: Gustavo Toyota Date: Thu, 15 Dec 2022 15:58:01 -0400 Subject: [PATCH] fix: make autopipeline 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 410507f7f..8fbe5ee76 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)) {