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

enumerate SampledStat.samples got null item

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 1.1.0
    • Fix Version/s: None
    • Component/s: metrics
    • Labels:
      None
    • Flags:
      Patch, Important

      Description

      java.lang.NullPointerException at org.apache.kafka.common.metrics.stats.SampledStat.purgeObsoleteSamples(SampledStat.java:104) at org.apache.kafka.common.metrics.stats.SampledStat.measure(SampledStat.java:74) at org.apache.kafka.common.metrics.KafkaMetric.metricValue(KafkaMetric.java:68) at kafka.api.QuotaTestClients$.metricValue(BaseQuotaTest.scala:163) at kafka.api.QuotaTestClients.produceUntilThrottled(BaseQuotaTest.scala:193) at kafka.api.BaseQuotaTest.testThrottledProducerConsumer(BaseQuotaTest.scala:84)
       
          protected void purgeObsoleteSamples(MetricConfig config, long now) {
              long expireAge = config.samples() * config.timeWindowMs();
              for (Sample sample : samples) {
                  if (now - sample.lastWindowMs >= expireAge)  // line 104, sample is null, probably is a concurrent issue
                      sample.reset(now);
              }
          }
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              koqizhao Qiang Zhao
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 168h
                168h
                Remaining:
                Remaining Estimate - 168h
                168h
                Logged:
                Time Spent - Not Specified
                Not Specified