You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/02/11 02:24:58 UTC

[GitHub] [kafka] hachikuji opened a new pull request #10107: MINOR: Improve confusing admin client shutdown logging

hachikuji opened a new pull request #10107:
URL: https://github.com/apache/kafka/pull/10107


   If the admin client is shutdown with some unfinished calls, we see messages such as the following in the log:
   ```
   2021-02-09 11:08:05.964 DEBUG [AdminClient clientId=adminclient-1] Call(callName=fetchMetadata, deadlineMs=1612843805378) timed out at 9223372036854775807 after 1 attempt(s)
   ```
   The problem is that we are using passing `Long.MaxValue` as the current time in `Call.fail` and we are discarding the original cause. The patch fixes the problem by setting `aborted=true` instead and preserving the original exception message.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


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

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



[GitHub] [kafka] chia7712 commented on a change in pull request #10107: MINOR: Improve confusing admin client shutdown logging

Posted by GitBox <gi...@apache.org>.
chia7712 commented on a change in pull request #10107:
URL: https://github.com/apache/kafka/pull/10107#discussion_r574286504



##########
File path: clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java
##########
@@ -756,6 +756,11 @@ protected Node curNode() {
             return curNode;
         }
 
+        void abortAndFail(Throwable throwable) {

Review comment:
       How about changing the input type from `Throwable` to `TimeoutException`? The exception passed to this method should NOT be wrapped by `TimeoutException`. Using explicit type (`TimeoutException`) can prevent us from passing incorrect exception in the future.




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

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



[GitHub] [kafka] hachikuji commented on a change in pull request #10107: MINOR: Improve confusing admin client shutdown logging

Posted by GitBox <gi...@apache.org>.
hachikuji commented on a change in pull request #10107:
URL: https://github.com/apache/kafka/pull/10107#discussion_r574689734



##########
File path: clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java
##########
@@ -756,6 +756,11 @@ protected Node curNode() {
             return curNode;
         }
 
+        void abortAndFail(Throwable throwable) {

Review comment:
       Makes sense.




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

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



Re: [GitHub] [kafka] hachikuji merged pull request #10107: MINOR: Improve confusing admin client shutdown logging

Posted by Ran Lupovich <ra...@gmail.com>.
Unsubscribe

בתאריך יום ו׳, 12 בפבר׳ 2021, 01:12, מאת GitBox ‏<gi...@apache.org>:

>
> hachikuji merged pull request #10107:
> URL: https://github.com/apache/kafka/pull/10107
>
>
>
>
>
> ----------------------------------------------------------------
> 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.
>
> For queries about this service, please contact Infrastructure at:
> users@infra.apache.org
>
>
>

[GitHub] [kafka] hachikuji merged pull request #10107: MINOR: Improve confusing admin client shutdown logging

Posted by GitBox <gi...@apache.org>.
hachikuji merged pull request #10107:
URL: https://github.com/apache/kafka/pull/10107


   


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

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



[GitHub] [kafka] dajac commented on a change in pull request #10107: MINOR: Improve confusing admin client shutdown logging

Posted by GitBox <gi...@apache.org>.
dajac commented on a change in pull request #10107:
URL: https://github.com/apache/kafka/pull/10107#discussion_r574411116



##########
File path: clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java
##########
@@ -657,7 +657,7 @@ public void close(Duration timeout) {
                 // Wait for the thread to be joined.
                 thread.join(waitTimeMs);
             }
-            log.debug("Kafka admin client closed.");
+            log.info("Kafka admin client closed.");

Review comment:
       I wonder if changing this log level is really necessary. What's the rational behind it?




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

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



[GitHub] [kafka] hachikuji commented on a change in pull request #10107: MINOR: Improve confusing admin client shutdown logging

Posted by GitBox <gi...@apache.org>.
hachikuji commented on a change in pull request #10107:
URL: https://github.com/apache/kafka/pull/10107#discussion_r574694145



##########
File path: clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java
##########
@@ -657,7 +657,7 @@ public void close(Duration timeout) {
                 // Wait for the thread to be joined.
                 thread.join(waitTimeMs);
             }
-            log.debug("Kafka admin client closed.");
+            log.info("Kafka admin client closed.");

Review comment:
       I think it is helpful to get at least one log message at info level in shutdown. Really at the start of shutdown is best since it triggers logic which can be difficult to explain if you don't know shutdown is taking place. Anyway, let me remove this change here and I can open a separate patch so that we can do this consistently in all the clients.




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

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