Description
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
TimeoutException("The AdminClient thread is not accepting new calls.")
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.
Attachments
Issue Links
- links to