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)