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

gerlowskija pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_10x by this push:
     new 941a1d90e75 SOLR-18417: Deprecate v1 PingRequestHandler and related 
code (#4872)
941a1d90e75 is described below

commit 941a1d90e759bb984ad180a73a5d9e4dc93a6deb
Author: Jason Gerlowski <[email protected]>
AuthorDate: Mon Sep 7 08:12:50 2026 -0400

    SOLR-18417: Deprecate v1 PingRequestHandler and related code (#4872)
    
    PingRequestHandler has largely been superseded by HealthcheckHandler (or 
even
    SystemInfoHandler) which do healthchecks at the node-level instead and tend 
to
    be much more compatible with typical load balancers.
    
    This commit deprecates PingRequestHandler and some related code, including 
the
    SolrPing and SolrPingResponse classes in SolrJ, and the SolrClient.ping()
    methods on the SolrClient.
    
    Removal will be handled in a subsequent (main-only) PR.
---
 changelog/unreleased/SOLR-18417-deprecate-pingrequesthandler.yml  | 7 +++++++
 .../core/src/java/org/apache/solr/handler/PingRequestHandler.java | 4 ++++
 .../configuration-guide/pages/implicit-requesthandlers.adoc       | 2 ++
 solr/solr-ref-guide/modules/deployment-guide/pages/ping.adoc      | 6 ++++++
 solr/solrj/src/java/org/apache/solr/client/solrj/SolrClient.java  | 4 ++++
 .../src/java/org/apache/solr/client/solrj/request/SolrPing.java   | 3 +++
 .../org/apache/solr/client/solrj/response/SolrPingResponse.java   | 2 ++
 .../src/java/org/apache/solr/common/params/CommonParams.java      | 8 +++++++-
 8 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/changelog/unreleased/SOLR-18417-deprecate-pingrequesthandler.yml 
b/changelog/unreleased/SOLR-18417-deprecate-pingrequesthandler.yml
new file mode 100644
index 00000000000..fb82ab8f6d1
--- /dev/null
+++ b/changelog/unreleased/SOLR-18417-deprecate-pingrequesthandler.yml
@@ -0,0 +1,7 @@
+type: deprecated
+title: Deprecate PingRequestHandler (the "/admin/ping" endpoint), SolrPing, 
SolrPingResponse, and SolrClient.ping()/ping(String).
+authors:
+  - name: Jason Gerlowski
+links:
+  - name: SOLR-18417
+    url: https://issues.apache.org/jira/browse/SOLR-18417
diff --git a/solr/core/src/java/org/apache/solr/handler/PingRequestHandler.java 
b/solr/core/src/java/org/apache/solr/handler/PingRequestHandler.java
index f7eaa97db78..ee49eed153d 100644
--- a/solr/core/src/java/org/apache/solr/handler/PingRequestHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/PingRequestHandler.java
@@ -105,8 +105,12 @@ import org.slf4j.LoggerFactory;
  *       healthcheck file exists ("<code>enabled</code>") or not 
("<code>disabled</code>")
  * </ul>
  *
+ * @deprecated This handler is deprecated and will be removed in a future 
release. For load balancer
+ *     or orchestration health checks, use {@link 
org.apache.solr.handler.admin.HealthCheckHandler}
+ *     instead. instead.
  * @since solr 1.3
  */
+@Deprecated(since = "10.1")
 public class PingRequestHandler extends RequestHandlerBase implements 
SolrCoreAware {
   private static final Logger log = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
diff --git 
a/solr/solr-ref-guide/modules/configuration-guide/pages/implicit-requesthandlers.adoc
 
b/solr/solr-ref-guide/modules/configuration-guide/pages/implicit-requesthandlers.adoc
index 005742a7cec..6adff4771b7 100644
--- 
a/solr/solr-ref-guide/modules/configuration-guide/pages/implicit-requesthandlers.adoc
+++ 
b/solr/solr-ref-guide/modules/configuration-guide/pages/implicit-requesthandlers.adoc
@@ -83,6 +83,8 @@ This handler must have a collection name in the path to the 
endpoint.
 Ping:: Health check.
 This handler must have a collection name in the path to the endpoint.
 +
+CAUTION: `PingRequestHandler` is deprecated and will be removed in a future 
release. Use the `Health` endpoint below instead.
++
 *Documentation*: xref:deployment-guide:ping.adoc[]
 +
 [cols="3*.",frame=none,grid=cols,options="header"]
diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/ping.adoc 
b/solr/solr-ref-guide/modules/deployment-guide/pages/ping.adoc
index 169fb97e9ab..558dddac292 100644
--- a/solr/solr-ref-guide/modules/deployment-guide/pages/ping.adoc
+++ b/solr/solr-ref-guide/modules/deployment-guide/pages/ping.adoc
@@ -16,6 +16,12 @@
 // specific language governing permissions and limitations
 // under the License.
 
+[WARNING]
+====
+The `/admin/ping` endpoint (`PingRequestHandler`) is deprecated and will be 
removed in a future release.
+For load balancer or orchestration health checks, use the 
`solr/admin/info/health` (v1) or `api/node/health` (v2) endpoint, documented in 
the "Health" section of 
xref:configuration-guide:implicit-requesthandlers.adoc[], instead.
+====
+
 Choosing Ping under a core name issues a `ping` request to check whether the 
core is up and responding to requests.
 
 .Ping Option in Core Dropdown
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/SolrClient.java 
b/solr/solrj/src/java/org/apache/solr/client/solrj/SolrClient.java
index 5d54d12155a..fbc5ef6df2b 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/SolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/SolrClient.java
@@ -895,7 +895,9 @@ public abstract class SolrClient implements Serializable, 
Closeable {
    *     response from the server
    * @throws IOException If there is a low-level I/O error.
    * @throws SolrServerException if there is an error on the server
+   * @deprecated This method is deprecated and will be removed in a future 
release.
    */
+  @Deprecated(since = "10.1")
   public SolrPingResponse ping(String collection) throws SolrServerException, 
IOException {
     return new SolrPing().process(this, collection);
   }
@@ -907,7 +909,9 @@ public abstract class SolrClient implements Serializable, 
Closeable {
    *     response from the server
    * @throws IOException If there is a low-level I/O error.
    * @throws SolrServerException if there is an error on the server
+   * @deprecated This method is deprecated and will be removed in a future 
release.
    */
+  @Deprecated(since = "10.1")
   public SolrPingResponse ping() throws SolrServerException, IOException {
     return new SolrPing().process(this, null);
   }
diff --git 
a/solr/solrj/src/java/org/apache/solr/client/solrj/request/SolrPing.java 
b/solr/solrj/src/java/org/apache/solr/client/solrj/request/SolrPing.java
index 2b9f9824802..a08d9c89ec1 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/SolrPing.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/SolrPing.java
@@ -26,8 +26,11 @@ import org.apache.solr.common.util.NamedList;
  * org.apache.solr.client.solrj.SolrClient}. To use this class, the 
solrconfig.xml for the relevant
  * core must include the request handler for <code>/admin/ping</code>.
  *
+ * @deprecated <code>PingRequestHandler</code> (the <code>/admin/ping</code> 
endpoint) is deprecated
+ *     and will be removed in a future release. Use {@link HealthCheckRequest} 
instead.
  * @since solr 1.3
  */
+@Deprecated(since = "10.1")
 public class SolrPing extends CollectionRequiringSolrRequest<SolrPingResponse> 
{
 
   /** serialVersionUID. */
diff --git 
a/solr/solrj/src/java/org/apache/solr/client/solrj/response/SolrPingResponse.java
 
b/solr/solrj/src/java/org/apache/solr/client/solrj/response/SolrPingResponse.java
index da124f13594..6c0d8940712 100644
--- 
a/solr/solrj/src/java/org/apache/solr/client/solrj/response/SolrPingResponse.java
+++ 
b/solr/solrj/src/java/org/apache/solr/client/solrj/response/SolrPingResponse.java
@@ -17,8 +17,10 @@
 package org.apache.solr.client.solrj.response;
 
 /**
+ * @deprecated This class is deprecated and will be removed in a future 
release.
  * @since solr 1.3
  */
+@Deprecated(since = "10.1")
 public class SolrPingResponse extends SolrResponseBase {
   // nothing special now...
 }
diff --git 
a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java 
b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
index 3bed47aac57..31ad4a1e5d7 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
@@ -75,7 +75,13 @@ public interface CommonParams {
   String INDENT = "indent";
 
   // SOLR-4228 start
-  /** handler value for SolrPing */
+  /**
+   * handler value for SolrPing
+   *
+   * @deprecated <code>PingRequestHandler</code> (the <code>/admin/ping</code> 
endpoint) is
+   *     deprecated and will be removed in a future release.
+   */
+  @Deprecated(since = "10.1")
   String PING_HANDLER = "/admin/ping";
 
   /** "action" parameter for SolrPing */

Reply via email to