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

ConcurrentModificationException when reporting requests-in-flight in producer

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.0.0
    • Fix Version/s: None
    • Component/s: metrics, network
    • Labels:
      None

      Description

      We are running in an issue really similar to KAFKA-4950.

      We have a producer running and a MetricsReporter with a background thread which publishes these metrics.

      The concurrent exception happens when calling `InFlightRequests.count()` in one thread when a connection or disconnection is happening.
      In this case one thread is iterating over the map while another is adding/removing from it thus causing the exception.

      We could potentially fix this with a volatile like in KAFKA-4950.

        Attachments

          Activity

            People

            • Assignee:
              cmolter Charly Molter
              Reporter:
              cmolter Charly Molter
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: