From b796fc311497b084a4b5710f7b4664727fcf24b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20M=C3=A4enp=C3=A4=C3=A4?= Date: Mon, 13 Feb 2023 19:55:06 +0200 Subject: [PATCH] added the fix from https://github.com/luin/ioredis/pull/1693 to try and fix auto pipelining in redis cluster --- lib/autoPipelining.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/autoPipelining.ts b/lib/autoPipelining.ts index 68adc2a4..d5923580 100644 --- a/lib/autoPipelining.ts +++ b/lib/autoPipelining.ts @@ -147,9 +147,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)) {