From 4c483a5a618d59ab8dc7b46904562785b16f71e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Svensson?= Date: Mon, 13 Jan 2025 11:44:48 +0100 Subject: [PATCH] Retry the async slotmap update when the update fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Björn Svensson --- hircluster.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hircluster.c b/hircluster.c index d48d4c6..bfcf32a 100644 --- a/hircluster.c +++ b/hircluster.c @@ -3852,7 +3852,8 @@ void clusterSlotsReplyCallback(redisAsyncContext *ac, void *r, void *privdata) { redisClusterContext *cc = acc->cc; dict *nodes = parse_cluster_slots(cc, &ac->c, reply); if (updateNodesAndSlotmap(cc, nodes) != REDIS_OK) { - /* Ignore failures for now */ + /* Retry using available nodes */ + updateSlotMapAsync(acc, NULL); } } @@ -3871,7 +3872,8 @@ void clusterNodesReplyCallback(redisAsyncContext *ac, void *r, void *privdata) { redisClusterContext *cc = acc->cc; dict *nodes = parse_cluster_nodes(cc, &ac->c, reply); if (updateNodesAndSlotmap(cc, nodes) != REDIS_OK) { - /* Ignore failures for now */ + /* Retry using available nodes */ + updateSlotMapAsync(acc, NULL); } }