From bbb4fc39176324809d52d738bc81ee989ac3ab0e Mon Sep 17 00:00:00 2001 From: chakku Date: Sun, 11 Aug 2024 01:02:37 +0900 Subject: [PATCH] Simplify conditional logic: eliminate redundant if condition --- pkg/kgo/txn.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kgo/txn.go b/pkg/kgo/txn.go index 25cfd443..b3575421 100644 --- a/pkg/kgo/txn.go +++ b/pkg/kgo/txn.go @@ -429,7 +429,7 @@ retry: "state_currently_committed", currentCommit, ) s.cl.setOffsets(currentCommit, false) - } else if willTryCommit && endTxnErr == nil { + } else if willTryCommit { s.cl.cfg.logger.Log(LogLevelInfo, "transact session successful, setting to newly committed state", "tried_commit", willTryCommit, "postcommit", postcommit,