guozhangwang commented on code in PR #13138:
URL: https://github.com/apache/kafka/pull/13138#discussion_r1084463267


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/CoordinatorRequestManager.java:
##########
@@ -149,11 +156,14 @@ private void onSuccessfulResponse(final 
FindCoordinatorResponseData.Coordinator
                 coordinator.host(),
                 coordinator.port());
         log.info("Discovered group coordinator {}", coordinator);
-        coordinatorRequestState.reset();
+        coordinatorRequestState.onSuccessfulAttempt(currentTimeMs);
     }
 
-    private void onFailedCoordinatorResponse(final Exception exception, final 
long currentTimeMs) {
-        coordinatorRequestState.updateLastFailedAttempt(currentTimeMs);
+    private void onFailedResponse(
+        final long currentTimeMs,
+        final Throwable exception
+    ) {
+        coordinatorRequestState.onFailedAttempt(currentTimeMs);

Review Comment:
   Yeah that makes sense too. I was thinking on `onSuccessfulAttempt` we record 
the time in the end of the function so why not doing the same, but I think its 
does not matter much.



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