[ https://issues.apache.org/jira/browse/SOLR-14252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17040066#comment-17040066 ]
Andy Webb commented on SOLR-14252: ---------------------------------- We have this patch working on a non-production system that previously suffered NPEs when the metrics reporter is configured to show e.g. {{CACHE\.searcher.*}} which contains both numeric and non-numeric metrics. The output below illustrates how the latter's aggregations are now zero: {noformat} ... "CACHE.searcher.statsCache.missingGlobalFieldStats": { "count": 2, "max": 280, "min": 0, "mean": 140, "stddev": 197.9898987322333, "sum": 280, "values": { "core_node6": { "value": 280, "updateCount": 320 }, "core_node4": { "value": 0, "updateCount": 318 } } }, ... "CACHE.searcher.statsCache.statsCacheImpl": { "count": 2, "max": 0, "min": 0, "mean": 0, "stddev": 0, "sum": 0, "values": { "core_node6": { "value": "LocalStatsCache", "updateCount": 320 }, "core_node4": { "value": "LocalStatsCache", "updateCount": 318 } } }, ... {noformat} > NullPointerException in AggregateMetric > --------------------------------------- > > Key: SOLR-14252 > URL: https://issues.apache.org/jira/browse/SOLR-14252 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Components: metrics > Reporter: Andy Webb > Assignee: Andrzej Bialecki > Priority: Major > Time Spent: 3.5h > Remaining Estimate: 0h > > The {{getMax}} and {{getMin}} methods in > [AggregateMetric|https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/metrics/AggregateMetric.java] > can throw an NPE if non-{{Number}} values are present in {{values}}, when it > tries to cast a {{null}} {{Double}} to a {{double}}. > This PR prevents the NPE occurring: > [https://github.com/apache/lucene-solr/pull/1265] > (We've also noticed an error in the documentation - see > https://github.com/apache/lucene-solr/commit/109d3411cd3866d83273187170dbc5b8b3211d20 > - this could be pulled out into a separate ticket if necessary?) -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org