atharvalade commented on code in PR #2884:
URL: https://github.com/apache/iggy/pull/2884#discussion_r2898962212
##########
foreign/go/client/tcp/tcp_core.go:
##########
@@ -335,7 +335,10 @@ func (c *IggyTcpClient) connect() error {
}
// TODO handle tls logic
var conn net.Conn
- if err := retry.Do(
+ if err := retry.New(
Review Comment:
retry-go v5 defaults to exponential backoff with jitter. With a 2s base
delay and infinite retries, the gap between attempts grows fast: 2s, 4s, 8s,
16s... after about 10 failures you're waiting 17 minutes between attempts, and
after 15 you're waiting 9 hours. This defeats the purpose of infinite
reconnection. The Rust client this is meant to align with uses a fixed interval
(see `tcp_client.rs:329`), so you should add
`retry.DelayType(retry.FixedDelay)` here. Alternatively, if you want to keep
exponential backoff, at least add a `retry.MaxDelay(...)` cap like the C#
client does (30s).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]