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

RestClient Interrupting the thread in case of InterruptedException

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.9.0
    • connect

    Description

      In RestClient class, httpRequest is being called with different threads. An InterruptedException in case of failure is used to handle its specific exceptions, nevertheless it's forgot to call Thread.currentThread().interrupt().

      In general, it's a good practice to call this so the rest of code know the thread was interrupted already.
      Note:
      Some methods that cause a thread to wait or sleep (like Thread.sleep()) will check this flag. If they see it’s set, they’ll stop waiting/sleeping and throw an InterruptedException.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ksolves.kafka Ksolves India Limited
            mehrdad.karami Mehrdad Karami
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment