Skip to content

Commit

Permalink
Do not send tracers when running second iteration of cluster nodes di…
Browse files Browse the repository at this point in the history
…scovery (#2520)

Sending tracers is not necessary because we just connected to the nodes a few seconds ago. It causes problems because sent tracers do not have enough time to respond.
  • Loading branch information
Matiszak authored and Mateusz Urbański committed Aug 16, 2023
1 parent ce9506b commit 2ca09a0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/StackExchange.Redis/ConnectionMultiplexer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1478,8 +1478,9 @@ internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, LogP
servers[i] = server;

// This awaits either the endpoint's initial connection, or a tracer if we're already connected
// (which is the reconfigure case)
available[i] = server.OnConnectedAsync(log, sendTracerIfConnected: true, autoConfigureIfConnected: reconfigureAll);
// (which is the reconfigure case, except second iteration which is only for newly discovered cluster members).
var isFirstIteration = iter == 0;
available[i] = server.OnConnectedAsync(log, sendTracerIfConnected: isFirstIteration, autoConfigureIfConnected: reconfigureAll);
}

watch ??= ValueStopwatch.StartNew();
Expand Down

0 comments on commit 2ca09a0

Please sign in to comment.