You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Luke Chen (Jira)" <ji...@apache.org> on 2023/09/26 08:06:00 UTC

[jira] [Created] (KAFKA-15507) adminClient should not throw retriable exception when closing instance

Luke Chen created KAFKA-15507:
---------------------------------

             Summary: adminClient should not throw retriable exception when closing instance
                 Key: KAFKA-15507
                 URL: https://issues.apache.org/jira/browse/KAFKA-15507
             Project: Kafka
          Issue Type: Bug
          Components: admin
    Affects Versions: 3.5.1
            Reporter: Luke Chen


When adminClient is closing the instance, it'll first set `hardShutdownTimeMs` to a positive timeout value, and then wait until existing threads to complete within the timeout. However, within this waiting, when new caller tries to invoke new commend in adminClient, it'll immediately get an 


{code:java}
TimeoutException("The AdminClient thread is not accepting new calls.")
{code}

There are some issues with the design:
1. Since the `TimeoutException` is a retriable exception, the caller will enter a tight loop and keep trying it
2. The error message is confusing. What does "the adminClient is not accepting new calls" mean?

We should improve it by throwing a non-retriable error (ex: IllegalStateException), then, the error message should clearly describe the adminClient is closing.




--
This message was sent by Atlassian Jira
(v8.20.10#820010)