Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-16092 Queues for Kafka
  3. KAFKA-18129

`SharePartition#maybeInitialize` should complete the future outsize the write lock

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0
    • None
    • None

    Description

      In reference to comment https://github.com/apache/kafka/pull/17957#discussion_r1862570482 ,

      It might be better not to complete the future while holding the write lock. The registered action for the future could potentially try to acquire another lock that is held by a different thread, which, in turn, could be waiting on the write lock - resulting in a deadlock.

      In short, I prefer to narrow the scope of the write lock to avoid potential deadlock issues.

      Attachments

        Issue Links

          Activity

            People

              adixitconfluent Abhinav Dixit
              adixitconfluent Abhinav Dixit
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: