Skip to content

Commit

Permalink
Retry the async slotmap update when the update fails
Browse files Browse the repository at this point in the history
Signed-off-by: Björn Svensson <[email protected]>
  • Loading branch information
bjosv committed Jan 13, 2025
1 parent e4dc746 commit 4c483a5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hircluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand All @@ -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);
}
}

Expand Down

0 comments on commit 4c483a5

Please sign in to comment.