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


##########
clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java:
##########
@@ -835,6 +836,10 @@ final void fail(long now, Throwable throwable) {
                 log.debug("{} failed: {}. Beginning retry #{}",
                     this, prettyPrintException(throwable), tries);
             }
+            //Temporarily save the last exception of the call,

Review Comment:
   nit: space after `//`.



##########
clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java:
##########
@@ -944,7 +949,7 @@ int handleTimeouts(Collection<Call> calls, String msg) {
                 Call call = iter.next();
                 int remainingMs = calcTimeoutMsRemainingAsInt(now, 
call.deadlineMs);
                 if (remainingMs < 0) {
-                    call.fail(now, new TimeoutException(msg + " Call: " + 
call.callName));
+                    call.fail(now, new TimeoutException(msg + " Call: " + 
call.callName,call.lastThrowable));

Review Comment:
   I think it's better to clarify it as "the last error causing retry is..", 
also nit: space after `,`.



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