Skip to content

Commit

Permalink
txn: move concurrent transactions log to debug level
Browse files Browse the repository at this point in the history
This was noisy and completely not actionable nor really that
informative.
  • Loading branch information
twmb committed Mar 1, 2022
1 parent 3279e8d commit e3ef142
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/kgo/txn.go
Original file line number Diff line number Diff line change
Expand Up @@ -642,9 +642,9 @@ func (cl *Client) doWithConcurrentTransactions(name string, fn func() error) err
backoff := cl.cfg.txnBackoff
start:
err := fn()
if errors.Is(err, kerr.ConcurrentTransactions) && time.Since(start) < 10*time.Second {
if errors.Is(err, kerr.ConcurrentTransactions) && time.Since(start) < 5*time.Second {
tries++
cl.cfg.logger.Log(LogLevelInfo, fmt.Sprintf("%s failed with CONCURRENT_TRANSACTIONS, which may be because we ended a txn and began producing in a new txn too quickly; backing off and retrying", name),
cl.cfg.logger.Log(LogLevelDebug, fmt.Sprintf("%s failed with CONCURRENT_TRANSACTIONS, which may be because we ended a txn and began producing in a new txn too quickly; backing off and retrying", name),
"backoff", backoff,
"since_request_tries_start", time.Since(start),
"tries", tries,
Expand Down

0 comments on commit e3ef142

Please sign in to comment.