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

ClientQuotaManager.getOrCreateQuotaSensors() may return a null ClientSensors.throttleTimeSensor

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.10.0.0
    • Component/s: None
    • Labels:
      None

      Description

      It seems that the following situation is possible. Two threads try to call getOrCreateQuotaSensors() at the same time. Initially, quotaSensor is not registered, then both threads try to get the write lock to register quotaSensor. Thread 1 grabs the write lock and registers both quotaSensor and throttleTimeSensor, and then releases the lock. Thread 2 grabs the write lock again and reads a non-null quotaSensor. It then skips the logic to register throttleTimeSensor and returns. However, the returned throttleTimeSensor will be null.

        Attachments

          Activity

            People

            • Assignee:
              ijuma Ismael Juma
              Reporter:
              junrao Jun Rao
              Reviewer:
              Jun Rao
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: