Skip to content

SOLR-18417: Remove PingRequestHandler and related code - #4874

Open
gerlowskija wants to merge 7 commits into
apache:mainfrom
gerlowskija:SOLR-18417-remove-prh-code-2
Open

gerlowskija wants to merge 7 commits into
apache:mainfrom
gerlowskija:SOLR-18417-remove-prh-code-2

Conversation

@gerlowskija

Copy link
Copy Markdown
Contributor

Removes PingRequestHandler, SolrPing, SolrPingResponse,
SolrClient.ping(), and various related constants. This follows their
deprecation in Solr 10.1.

(This PR requires the as-yet-unmerged #4872, and will be left as
a draft until it is merged. See that PR for more discussion around
the deprecation/removal of this functionality.)

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 the corresponding SolrPing
class in SolrJ.  Removal will occur in a subsequent ('main'-only)
commit.
Removes PingRequestHandler, SolrPing, SolrPingResponse,
SolrClient.ping(), and various related constants.  This follows their
deprecation in Solr 10.1.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the change that I am sad about, that all our content, if I understand it right, on monitoring was in this page, and we lose that. We don't have the equivalent of healthcheck.adoc...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I went ahead and put a page togther, would love your feedback: #4886

It's meant to be merged after this PR is merged.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking that on, I've put some review comments on your PR!

@epugh

epugh commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

by the way, solr/webapp/web/css/angular/dashboard.css still has #healthcheck/.ico/.ico-1 selector rules that this PR doesn't touch — they'll become dead CSS once the HTML that used them is deleted.

@gerlowskija
gerlowskija marked this pull request as ready for review September 8, 2026 12:58
@gerlowskija

Copy link
Copy Markdown
Contributor Author

they'll become dead CSS once the HTML that used them is deleted

Meaning that this PR should remove those CSS bits, right? Happy to do that, just confirming.

Extremely low value given how infrequently the (old) Admin UI gets edited, but I wonder if there's some sort of lint-check we could add to catch this...

@epugh

epugh commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

they'll become dead CSS once the HTML that used them is deleted

Meaning that this PR should remove those CSS bits, right? Happy to do that, just confirming.

Extremely low value given how infrequently the (old) Admin UI gets edited, but I wonder if there's some sort of lint-check we could add to catch this...

I used this linter: "Claude, tell me what Jason is getting wrong in this PR" ;-). Just kidding..... "Can you review this PR and run /simplify and /code-review --medium" and it found that issue.

@epugh

epugh commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

I shold probably have just done it an dpushed up the change......

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

This PR has had no activity for 60 days and is now labeled as stale. Any new activity will remove the stale label. To attract more reviewers, please tag people who might be familiar with the code area and/or notify the dev@solr.apache.org mailing list. To exempt this PR from being marked as stale, make it a draft PR or add the label "exempt-stale". If left unattended, this PR will be closed after another 60 days of inactivity. Thank you for your contribution!

@github-actions github-actions Bot added the stale PR not updated in 60 days label Nov 8, 2026
@epugh epugh self-assigned this Nov 8, 2026
@epugh

epugh commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

When I get a fresh batch of tokens I'll try and finish this up. I hate accoumulating lots of deprecated code on main!

@epugh epugh removed the stale PR not updated in 60 days label Nov 8, 2026
@@ -0,0 +1,7 @@
type: removed
title: `PingRequestHandler` (the "/admin/ping" endpoint), `SolrPing`, `SolrPingResponse`, and `SolrClient.ping()` have been removed. Users looking for a healthcheck API can use `/api/node/health` (v2) or `/solr/admin/info/health` (v1) instead. SolrJ users looking to replace "ping" functionality can either use `QueryRequest` for true query submission, or `HealthCheckRequest` for making a node-level healthcheck request.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's simplify a bit

type: removed
title: `PingRequestHandler` (the "/admin/ping" endpoint), `SolrPing`, `SolrPingResponse`, and `SolrClient.ping()` have been removed. Users looking for a healthcheck API can use `/api/node/health` (v2) or `/solr/admin/info/health` (v1) instead. SolrJ users looking to replace "ping" functionality can either use `QueryRequest` for true query submission, or `HealthCheckRequest` for making a node-level healthcheck request.
authors:
- name: Jason Gerlowski

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add Eric Pugh

assertTrue(configSection.containsKey("/select"));
assertTrue(configSection.containsKey("/admin/ping"));
assertTrue(configSection.containsKey("/admin/luke"));
assertFalse(configSection.containsKey("/admin/ping"));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do t need this assertFalse

assertTrue(configSection.containsKey("/select"));
assertTrue(configSection.containsKey("/admin/ping"));
assertTrue(configSection.containsKey("/admin/luke"));
assertFalse(configSection.containsKey("/admin/ping"));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dont need this asssert false

@epugh epugh added this to the 10.x milestone Nov 22, 2026
@epugh

epugh commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

CN this go to 10 or only 11

@janhoy
janhoy requested a balanced review from Copilot November 22, 2026 23:57
@janhoy

janhoy commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

I believe this shuold be main-only, i.e. remove the milestone.

@janhoy janhoy removed this from the 10.x milestone Nov 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The failure variants now hit the same healthy endpoint as the success cases, removing coverage of MDC propagation through asynchronous error processing; they need explicitly invalid requests and assertions of exceptional completion.

1 open issue
What changed in this PR

Removes the deprecated core-level Ping functionality for Solr 11, following the deprecation in #4872. The changes span the server, SolrJ, legacy Admin UI, tests, and reference guide.

Changes:

  • Remove PingRequestHandler, SolrJ ping APIs, implicit registration, and UI controls.
  • Replace remaining uses with health checks, queries, or other supported handlers.
  • Remove obsolete tests and documentation, and add upgrade guidance distinguishing node health from search checks.
File Description
solr/​webapp/​web/​partials/​core_overview.html Remove the Ping healthcheck widget.
solr/​webapp/​web/​js/​angular/​services.js Remove the Ping service.
solr/​webapp/​web/​js/​angular/​controllers/​core-overview.js Remove Ping status and toggle logic.
solr/​webapp/​web/​js/​angular/​app.js Remove the Ping action and dependency.
solr/​webapp/​web/​index.html Remove the Ping menu item.
solr/​webapp/​web/​css/​angular/​menu.css Remove Ping menu styles.
solr/​webapp/​web/​css/​angular/​dashboard.css Remove healthcheck widget styles.
solr/​webapp/​src/​test/​org/​apache/​solr/​webapp/​AdminUiCoreOverviewReplicationErrorsTest.java Update a comment to omit Ping.
solr/​webapp/​src/​test/​org/​apache/​solr/​webapp/​AdminUiCoreAdminStandaloneTest.java Remove the Ping message assertion.
solr/​webapp/​src/​test/​org/​apache/​solr/​webapp/​AdminUiCollectionScreensTest.java Remove the Ping message assertion.
solr/​solrj/​src/​test/​org/​apache/​solr/​common/​cloud/​PerReplicaStatesIntegrationTest.java Replace Ping with a query.
solr/​solrj/​src/​test/​org/​apache/​solr/​client/​solrj/​SolrExampleTests.java Remove the Ping test.
solr/​solrj/​src/​test/​org/​apache/​solr/​client/​solrj/​request/​SolrPingTest.java Delete the obsolete request tests.
solr/​solrj/​src/​test/​org/​apache/​solr/​client/​solrj/​impl/​HttpJdkSolrClientTest.java Remove the client Ping test.
solr/​solrj/​src/​test/​org/​apache/​solr/​client/​solrj/​impl/​CloudHttp2SolrClientTest.java Remove Ping coverage and use a query for replica-state checks.
solr/​solrj/​src/​test-files/​solrj/​solr/​collection1/​conf/​solrconfig.xml Remove the Ping handler declaration.
solr/​solrj/​src/​test-files/​solrj/​solr/​collection1/​conf/​solrconfig-sql.xml Remove the Ping handler declaration.
solr/​solrj/​src/​java/​org/​apache/​solr/​common/​params/​CommonParams.java Remove Ping-specific constants.
solr/​solrj/​src/​java/​org/​apache/​solr/​client/​solrj/​SolrClient.java Remove both ping() overloads.
solr/​solrj/​src/​java/​org/​apache/​solr/​client/​solrj/​response/​SolrPingResponse.java Delete the Ping response class.
solr/​solrj/​src/​java/​org/​apache/​solr/​client/​solrj/​request/​SolrPing.java Delete the Ping request class.
solr/​solrj-jetty/​src/​test/​org/​apache/​solr/​client/​solrj/​jetty/​HttpJettySolrClientTest.java Use a health request in exception coverage.
solr/​solr-ref-guide/​modules/​upgrade-notes/​pages/​major-changes-in-solr-11.adoc Document removal and migration options.
solr/​solr-ref-guide/​modules/​getting-started/​pages/​solr-admin-ui.adoc Remove the Ping screen link.
solr/​solr-ref-guide/​modules/​deployment-guide/​pages/​rule-based-authorization-plugin.adoc Update the health permission description.
solr/​solr-ref-guide/​modules/​deployment-guide/​pages/​ping.adoc Delete the Ping documentation.
solr/​solr-ref-guide/​modules/​deployment-guide/​examples/​UsingPingRefGuideExamplesTest.java Delete the Ping examples.
solr/​solr-ref-guide/​modules/​deployment-guide/​deployment-nav.adoc Remove Ping from navigation.
solr/​solr-ref-guide/​modules/​configuration-guide/​pages/​requesthandlers-searchcomponents.adoc Remove the Ping example reference.
solr/​solr-ref-guide/​modules/​configuration-guide/​pages/​implicit-requesthandlers.adoc Remove the implicit Ping endpoint documentation.
solr/​core/​src/​test/​org/​apache/​solr/​handler/​TestHttpRequestId.java Replace Ping with a health request.
solr/​core/​src/​test/​org/​apache/​solr/​handler/​PingRequestHandlerTest.java Delete the handler tests.
solr/​core/​src/​test/​org/​apache/​solr/​handler/​admin/​TestApiFramework.java Remove Ping from test registration.
solr/​core/​src/​test/​org/​apache/​solr/​handler/​admin/​api/​GetConfigTest.java Use Luke for handler configuration assertions.
solr/​core/​src/​test/​org/​apache/​solr/​handler/​admin/​api/​GetConfigSolrCloudTest.java Use Luke for collection configuration assertions.
solr/​core/​src/​test/​org/​apache/​solr/​core/​TestSolrConfigHandler.java Remove the Ping registration assertion.
solr/​core/​src/​test/​org/​apache/​solr/​core/​SolrCoreTest.java Update implicit handler expectations.
solr/​core/​src/​test-files/​solr/​collection1/​conf/​solrconfig-sql.xml Remove the Ping handler declaration.
solr/​core/​src/​resources/​ImplicitPlugins.json Remove implicit Ping registration.
solr/​core/​src/​java/​org/​apache/​solr/​metrics/​SolrMetricInfo.java Replace Ping in a Javadoc example.
solr/​core/​src/​java/​org/​apache/​solr/​handler/​PingRequestHandler.java Delete the server-side handler.
solr/​core/​src/​java/​org/​apache/​solr/​cloud/​RecoveryStrategy.java Use node health when contacting the leader.
changelog/​unreleased/​SOLR-18417-remove-pingrequesthandler.yml Record removal and replacement APIs.

Review effort: Balanced

cf =
client
.requestAsync(new SolrPing(), null)
.requestAsync(new HealthCheckRequest(), null)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants