lianetm commented on code in PR #15311:
URL: https://github.com/apache/kafka/pull/15311#discussion_r1483183111


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestState.java:
##########
@@ -132,6 +132,16 @@ public void onFailedAttempt(final long currentTimeMs) {
         this.numAttempts++;
     }
 
+    /**
+     * Set backoff and number of attempts to 0. This will ensure that the 
request is sent out
+     * again right away. Expected to be used when receiving errors responses 
that lead to a new
+     * request that can be sent without backing off (ex. member rejoining 
after fencing)
+     */
+    public void resetBackoff() {

Review Comment:
   yeap, that one was resetting the full state (not only the backoff), so 
initially I thought better to reset only what we need. But I totally agree that 
the "retries" after these errors can be seen as a fresh start, it does not harm 
to reset the full state, and it does simplify to reuse the single reset, done.



-- 
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