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

ConcurrentModificationException occurs when iterating through multiple partitions in Sender.getExpiredInflightBatches

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.0
    • 2.2.0, 2.1.1
    • core
    • None

    Description

      In Sender.getExpiredInflightBatches method, delivery.timeout on multiple partitions causes ConcurrentModificationException due to the underlying Java collection being mutated while being iterated on.

      In Java HashMap, you cannot mutate the underlying map while iterating through it, as this will cause ConcurrentModificationException.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              markcho Mark Cho
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: