You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2019/11/30 04:35:04 UTC

[lucene-solr] branch branch_8x updated: SOLR-13805: NPE when calling /solr/admin/info/health on standalone solr

This is an automated email from the ASF dual-hosted git repository.

shalin pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new ba95111  SOLR-13805: NPE when calling /solr/admin/info/health on standalone solr
ba95111 is described below

commit ba95111d71cc4d24b5ab4e8c022a3cbde42fd283
Author: Shalin Shekhar Mangar <sh...@apache.org>
AuthorDate: Sat Nov 30 10:04:00 2019 +0530

    SOLR-13805: NPE when calling /solr/admin/info/health on standalone solr
    
    (cherry picked from commit 5a697344ed1be537ef2acdd18aab653283593370)
---
 solr/CHANGES.txt                                                        | 2 ++
 .../core/src/java/org/apache/solr/handler/admin/HealthCheckHandler.java | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 1ed47a1..ad6423a 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -125,6 +125,8 @@ Bug Fixes
 
 * SOLR-13465: CoreContainer.auditloggerPlugin should be volatile (janhoy, hossman)
 
+* SOLR-13805: NPE when calling /solr/admin/info/health on standalone solr (Nicholas DiPiazza, shalin)
+
 Other Changes
 ---------------------
 
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/HealthCheckHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/HealthCheckHandler.java
index c496aaf..cc2a649 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/HealthCheckHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/HealthCheckHandler.java
@@ -66,7 +66,6 @@ public class HealthCheckHandler extends RequestHandlerBase {
   @Override
   public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception {
 
-    log.debug("Invoked HealthCheckHandler on [{}]", coreContainer.getZkController().getNodeName());
     CoreContainer cores = getCoreContainer();
 
     // Core container should not be null and active (redundant check)
@@ -79,6 +78,7 @@ public class HealthCheckHandler extends RequestHandlerBase {
       rsp.setException(new SolrException(SolrException.ErrorCode.BAD_REQUEST, "Health check is only available when running in SolrCloud mode"));
       return;
     }
+    log.debug("Invoked HealthCheckHandler on [{}]", coreContainer.getZkController().getNodeName());
     ZkStateReader zkStateReader = cores.getZkController().getZkStateReader();
     ClusterState clusterState = zkStateReader.getClusterState();
     // Check for isConnected and isClosed