Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-15507

adminClient should not throw retriable exception when closing instance

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.5.1
    • 3.7.0
    • admin
    • None

    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

          Activity

            People

              tinaselenge Gantigmaa Selenge
              showuon Luke Chen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: