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

`awaitProcessableTasks` is not safe in the presence of spurious wakeups.

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

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • streams
    • None

    Description

      According to JDK, `await` can be unblocked due to spurious wakeups https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/Condition.html

      Currently `DefaultTaskManager::awaitProcessableTasks` does not handle this scenario. Branch https://github.com/aoli-al/kafka/tree/KAFKA-82 shows a failing test because of this

      Command: ./gradlew :streams:test --tests DefaultTaskManagerTest.shouldBlockOnAwait

      Attachments

        Activity

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

          People

            Unassigned Unassigned
            aoli-al Ao Li

            Dates

              Created:
              Updated:

              Slack

                Issue deployment