You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ab...@apache.org on 2021/05/05 15:09:11 UTC

[solr] branch jira/solr-15300 updated: SOLR-15300: Add RefGuide docs and CHANGES.txt.

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

ab pushed a commit to branch jira/solr-15300
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/jira/solr-15300 by this push:
     new 286b80c  SOLR-15300: Add RefGuide docs and CHANGES.txt.
286b80c is described below

commit 286b80ce022b56ada4ff318f24465631758852d7
Author: Andrzej Bialecki <ab...@apache.org>
AuthorDate: Wed May 5 17:08:42 2021 +0200

    SOLR-15300: Add RefGuide docs and CHANGES.txt.
---
 solr/CHANGES.txt                                     |  2 ++
 solr/solr-ref-guide/src/cluster-node-management.adoc | 17 +++++++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 1488563..05fa280 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -41,6 +41,8 @@ New Features
 
 * SOLR-15090: A new 'gcs-repository' contrib can be used to store and retrieve backups from Google Cloud Storage. (Jason Gerlowski, Shalin Mangar, Cao Manh Dat)
 
+* SOLR-15300: Report collection and shard "health" state in CLUSTERSTATUS response. (ab, janhoy)
+
 Improvements
 ----------------------
 * LUCENE-8984: MoreLikeThis MLT is biased for uncommon fields (Andy Hind via Anshum Gupta)
diff --git a/solr/solr-ref-guide/src/cluster-node-management.adoc b/solr/solr-ref-guide/src/cluster-node-management.adoc
index 1e7c2df..d187f7f 100644
--- a/solr/solr-ref-guide/src/cluster-node-management.adoc
+++ b/solr/solr-ref-guide/src/cluster-node-management.adoc
@@ -26,6 +26,20 @@ These API commands work with a SolrCloud cluster at the entire cluster level, or
 
 Fetch the cluster status including collections, shards, replicas, configuration name as well as collection aliases and cluster properties.
 
+Additionally, this command reports a `health` status of each collection and shard, in
+order to make it easier to monitor the operational state of the collection. The
+following health state values are defined, ordered from the best to worst:
+
+* `GREEN` - all replicas are active, and there's a shard leader
+* `YELLOW` - less than 1/3rd of replicas in a shard is offline, and there's a shard leader
+* `ORANGE` - more than 1/3rd but less than 2/3rd of replicas in a shard is offline,
+  and there's a shard leader
+* `RED` - more than 2/3rd of replicas is offline, OR there's no shard leader.
+
+The collection health state is reported as the worst state of any shard, e.g. for a
+collection with all shards GREEN except for one YELLOW the collection health will be
+reported as YELLOW.
+
 [.dynamic-tabs]
 --
 [example.tab-pane#v1clusterstatus]
@@ -87,6 +101,7 @@ http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS
           "shard1":{
             "range":"80000000-ffffffff",
             "state":"active",
+            "health": "GREEN",
             "replicas":{
               "core_node1":{
                 "state":"active",
@@ -102,6 +117,7 @@ http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS
           "shard2":{
             "range":"0-7fffffff",
             "state":"active",
+            "health": "GREEN",
             "replicas":{
               "core_node2":{
                 "state":"active",
@@ -119,6 +135,7 @@ http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS
         "znodeVersion": 11,
         "autoCreated":"true",
         "configName" : "my_config",
+        "health": "GREEN",
         "aliases":["both_collections"]
       },
       "collection2":{