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

ProduceRequest#partitionSizes() is not an atomic operation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 3.5.2, 3.7.0, 3.6.1
    • producer
    • None

    Description

      Encountered a concurrency issue in method ProduceRequest#partitionSizes() while developing with Kafka. When both Thread 1 and Thread 2 concurrently call method ProduceRequest#partitionSizes(), Thread 2 may receive an incomplete or empty result if Thread 1 is still in the process of initializing partitionSizes. This is an incorrect state. the code to ensure that Thread 2 obtains the final state rather than an intermediate one.

      Attachments

        Issue Links

          Activity

            People

              fxbing Xiaobing Fang
              fxbing Xiaobing Fang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: