[ 
https://issues.apache.org/jira/browse/KAFKA-15507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17769087#comment-17769087
 ] 

Keith Wall commented on KAFKA-15507:
------------------------------------

Thank you for raising [~showuon] 

When I was looking at this issue yesterday, I noted that the behaviour of the 
Admin client is at odds with the behaviour of the Producer and Consumer client. 
 With those I see:

java.lang.IllegalStateException: Cannot perform operation after producer has 
been closed

java.lang.IllegalStateException: This consumer has already been closed.

> 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
>            Priority: Major
>
> 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)

Reply via email to