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

ASF subversion and git services commented on SOLR-18473:
--------------------------------------------------------

Commit 997d8a8b27dd0d70ba86c372f02f43f03d004215 in solr's branch 
refs/heads/branch_10x from Andrzej Bialecki
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=997d8a8b27d ]

SOLR-18473: Fix CrossDC Consumer NPE on shutdown. (#4932)

(cherry picked from commit b7850a48cafe39bdd55ca6abae011bfc0911b9c0)


> CrossDC Consumer NPE on shutdown
> --------------------------------
>
>                 Key: SOLR-18473
>                 URL: https://issues.apache.org/jira/browse/SOLR-18473
>             Project: Solr
>          Issue Type: Bug
>          Components: module - crossDC
>    Affects Versions: 10.1
>            Reporter: Andrzej Bialecki
>            Assignee: Andrzej Bialecki
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> CrossDC Consumer wants to print metrics on shutdown. It reuses the 
> {{MetricsHandler}} and {{PrometheusResponseWriter}} to avoid code duplication 
> but it passes a null {{{}SolrQueryRequest{}}}, which causes NPE:
> {noformat}
>   2> 48330 ERROR (SUITE-ZkConfigIntegrationTest-seed#[EB2ADD0EA02E80]-worker) 
> [] o.a.s.c.m.c.Util Error while writing final metrics
>     2> java.lang.NullPointerException: Cannot invoke 
> "org.apache.solr.request.SolrQueryRequest.getParams()" because "request" is 
> null
>     2>     at 
> org.apache.solr.response.PrometheusResponseWriter.writeOpenMetricsFormat(PrometheusResponseWriter.java:88)
>     2>     at 
> org.apache.solr.response.PrometheusResponseWriter.writeMetricSnapshots(PrometheusResponseWriter.java:75)
>     2>     at 
> org.apache.solr.response.PrometheusResponseWriter.write(PrometheusResponseWriter.java:69)
>     2>     at 
> org.apache.solr.crossdc.manager.consumer.Util.logMetrics(Util.java:52)
>     2>     at 
> org.apache.solr.crossdc.manager.consumer.KafkaCrossDcConsumer.shutdown(KafkaCrossDcConsumer.java:695)
>     2>     at 
> org.apache.solr.crossdc.manager.consumer.Consumer.shutdown(Consumer.java:165)
>     2>     at 
> org.apache.solr.crossdc.manager.ZkConfigIntegrationTest.afterSolrAndKafkaIntegrationTest(ZkConfigIntegrationTest.java:166){noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to