kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Qiang Zhao (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (KAFKA-6787) enumerate SampledStat.samples got null item
Date Fri, 13 Apr 2018 04:53:00 GMT

    [ https://issues.apache.org/jira/browse/KAFKA-6787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16436802#comment-16436802
] 

Qiang Zhao edited comment on KAFKA-6787 at 4/13/18 4:52 AM:
------------------------------------------------------------

It's critical and hard to fix. Hope someone else can take it. :D


was (Author: koqizhao):
It's critical and hard to fix. Home someone else can take it. :D

> enumerate SampledStat.samples got null item
> -------------------------------------------
>
>                 Key: KAFKA-6787
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6787
>             Project: Kafka
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 1.1.0
>            Reporter: Qiang Zhao
>            Priority: Critical
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> 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)
>  
> {code:java}
>     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);
>         }
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message