Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pkg/agent/clientset.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,10 @@ func (cs *ClientSet) sync() {
klog.V(4).InfoS("duplicate server", "serverID", dse.ServerID, "serverCount", serverCount, "clientsCount", clientsCount)
if serverCount != 0 && clientsCount >= serverCount {
duration = backoff.Step()
} else {
backoff = cs.resetBackoff()
duration = wait.Jitter(backoff.Duration, backoff.Jitter)
}
// When clientsCount < serverCount, we need a new connection.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has potential negative impact if something else is going on and now we generate a ton of connection requests. Happy to have this added as an option but I think it would be safer to add a flag for this behavior. We should also default to the existing behavior so we are backward compatible.

// Leave duration at 0 to retry immediately without delay,
// allowing fast reconnection via DNS load balancing.
} else {
klog.ErrorS(err, "cannot connect once")
duration = backoff.Step()
Expand Down
Loading