From b26489fc308ca2428ef50d221ba18124ba710ef4 Mon Sep 17 00:00:00 2001 From: Travis Bischel Date: Sun, 6 Jun 2021 00:34:20 -0600 Subject: [PATCH] config: change default non-produce retries from unlimited to 30 Non-produce requests should *not* retry indefinitely. This pairs with the default request failure limit of 1minute. --- pkg/kgo/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/kgo/config.go b/pkg/kgo/config.go index ffd879fb..3bdd5f0e 100644 --- a/pkg/kgo/config.go +++ b/pkg/kgo/config.go @@ -287,7 +287,7 @@ func defaultCfg() cfg { return backoff } }(), - retries: math.MaxInt64, // effectively unbounded + retries: 30, retryTimeout: func(key int16) time.Duration { if key == 26 { // EndTxn key return 5 * time.Minute @@ -462,7 +462,7 @@ func RetryBackoff(backoff func(int) time.Duration) Opt { } // RequestRetries sets the number of tries that retriable requests are allowed, -// overriding the unlimited default. This option does not apply to produce +// overriding the default of 30. This option does not apply to produce // requests; to limit produce request retries, see ProduceRetries. func RequestRetries(n int) Opt { return clientOpt{func(cfg *cfg) { cfg.retries = int64(n) }}