Skip to content

Apache Lucene open-source search software

SOLR-14210: Add javadocs and refguide docs

Jan Høydahl60545a89e0ac
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 afa841640e6..741faf007e0 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
@@ -40,14 +40,27 @@ import static org.apache.solr.common.params.CommonParams.FAILURE;
import static org.apache.solr.common.params.CommonParams.OK;
import static org.apache.solr.common.params.CommonParams.STATUS;
-/*
+/**
* Health Check Handler for reporting the health of a specific node.
*
- * This checks if:
- * 1. Cores container is active.
- * 2. Node connected to zookeeper.
- * 3. Node listed in 'live_nodes' in zookeeper.
- * 4. No RECOVERING or DOWN cores (if request param requireHealthyCores=true)
+ * <p>
+ * By default the handler returns status <code>200 OK</code> if all checks succeed, else it returns
+ * status <code>503 UNAVAILABLE</code>:
+ * <ol>
+ * <li>Cores container is active.</li>
+ * <li>Node connected to zookeeper.</li>
+ * <li>Node listed in <code>live_nodes</code> in zookeeper.</li>
+ * </ol>
+ * </p>
+ *
+ * <p>
+ * The handler takes an optional request parameter <code>requireHealthyCores=true</code>
+ * which will also require that all local cores that are part of an <b>active shard</b>
+ * are done initializing, i.e. not in states <code>RECOVERING</code> or <code>DOWN</code>.
+ * This parameter is designed to help during rolling restarts, to make sure each node
+ * is fully initialized and stable before proceeding with restarting the next node, and thus
+ * reduce the risk of restarting the last live replica of a shard.
+ * </p>
*/
public class HealthCheckHandler extends RequestHandlerBase {
diff --git a/solr/solr-ref-guide/src/implicit-requesthandlers.adoc b/solr/solr-ref-guide/src/implicit-requesthandlers.adoc
index 0703c4d98d4..434a61bdd81 100644
--- a/solr/solr-ref-guide/src/implicit-requesthandlers.adoc
+++ b/solr/solr-ref-guide/src/implicit-requesthandlers.adoc
@@ -138,6 +138,8 @@ v2: `api/node/health` |{solr-javadocs}/solr-core/org/apache/solr/handler/admin/H
This endpoint can also take the collection or core name in the path (`solr/<collection>/admin/health` or `solr/<core>/admin/health`).
+This endpoint also accepts additional request parameters. Please see {solr-javadocs}/solr-core/org/apache/solr/handler/admin/HealthCheckHandler.html[Javadocs] for details.
+
=== Analysis Handlers
[horizontal]