showuon commented on a change in pull request #11627:
URL: https://github.com/apache/kafka/pull/11627#discussion_r777398361



##########
File path: 
clients/src/main/java/org/apache/kafka/common/utils/ExponentialBackoff.java
##########
@@ -32,7 +32,16 @@
     private final double expMax;
     private final long initialInterval;
     private final double jitter;
+    private long attemptedCount = 0;

Review comment:
       add the `attemptedCount` in `ExponentialBackoff` class. The caller can 
use the `attemptedCount` and doesn't need to maintain the attempted count in 
their side. It's good when the `ExponentialBackoff` only has single place to 
backoff, or the caller is inside lambda expression. 




-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to