Andrzej Bialecki created SOLR-18473:
---------------------------------------

             Summary: 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


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