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

ConcurrentModificationException occurs when iterating through multiple partitions in Sender.getExpiredInflightBatches

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.2.0, 2.1.1
    • Component/s: core
    • Labels:
      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

              • Assignee:
                Unassigned
                Reporter:
                markcho Mark Cho
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: