Skip to content

Commit

Permalink
Reduced the max number of queried nodes in topology request
Browse files Browse the repository at this point in the history
  • Loading branch information
barshaul committed Jul 3, 2024
1 parent 1e07acc commit 4571c91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redis/src/cluster_async/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,7 @@ where
async fn refresh_slots_inner(inner: Arc<InnerCore<C>>, curr_retry: usize) -> RedisResult<()> {
let read_guard = inner.conn_lock.read().await;
let num_of_nodes = read_guard.len();
const MAX_REQUESTED_NODES: usize = 50;
const MAX_REQUESTED_NODES: usize = 10;
let num_of_nodes_to_query = std::cmp::min(num_of_nodes, MAX_REQUESTED_NODES);
let (new_slots, topology_hash) = calculate_topology_from_random_nodes(
&inner,
Expand Down

0 comments on commit 4571c91

Please sign in to comment.