Skip to content

SOLR-16390: Move cluster command-status APIs to /cluster/commands - #4866

Open
iprithv wants to merge 2 commits into
apache:mainfrom
iprithv:SOLR-16390-cluster-command-status
Open

SOLR-16390: Move cluster command-status APIs to /cluster/commands#4866
iprithv wants to merge 2 commits into
apache:mainfrom
iprithv:SOLR-16390-cluster-command-status

Conversation

@iprithv

@iprithv iprithv commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Renames the v2 cluster async-command APIs to be more REST-ful, and converts them from the homegrown @EndPoint wrappers to JAX-RS.

Signed-off-by: prithvi <prithvisivasankar@gmail.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation tests cat:api labels Sep 2, 2026
@epugh

epugh commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@epugh epugh 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.

LGTM. Having said that, I made one code change to make state an enumeration not a string, and so hoping @iprithv verifies it!

@epugh

epugh commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

this api is purely client side, and there are no changes to the V1 approach. This should be pretty low risk.

@epugh epugh self-assigned this Sep 2, 2026
@epugh
epugh requested a lite review from Copilot September 2, 2026 16:07

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.

🟢 Approval recommended

The new JAX-RS APIs, v1 delegation, documentation updates, and added SolrCloud tests appear consistent and complete for the endpoint rename.

Pull request overview

This PR renames the v2 cluster-level async command status APIs from the legacy /api/cluster/command-status shape to a more REST-friendly /api/cluster/commands resource, and migrates the implementation from @EndPoint mappings to JAX-RS (while keeping v1 REQUESTSTATUS/DELETESTATUS behavior working via delegation).

Changes:

  • Introduces new JAX-RS endpoint definitions and response models for GET/DELETE /api/cluster/commands/{requestId} and DELETE /api/cluster/commands.
  • Refactors v1 REQUESTSTATUS / DELETESTATUS operations to delegate to the new JAX-RS implementation for consistent behavior.
  • Updates ref-guide + developer docs, adds new SolrCloud HTTP tests for the new endpoints, and removes now-obsolete v2-to-v1 mapping tests for the old path.
File summaries
File Description
solr/solr-ref-guide/modules/configuration-guide/pages/collections-api.adoc Updates ref-guide examples to use /api/cluster/commands and clarifies flush is v1-only.
solr/core/src/test/org/apache/solr/handler/V2ClusterAPIMappingTest.java Removes mapping tests for the retired /cluster/command-status @EndPoint routes.
solr/core/src/test/org/apache/solr/handler/admin/api/ClusterCommandsTest.java Adds SolrCloud HTTP coverage for GET/DELETE cluster command status via SolrJ request classes.
solr/core/src/java/org/apache/solr/handler/ClusterAPI.java Removes the old @EndPoint handlers for /cluster/command-status.
solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java Routes v1 REQUESTSTATUS/DELETESTATUS handling through the new ClusterCommands implementation and registers the Jersey resource.
solr/core/src/java/org/apache/solr/handler/admin/api/ClusterCommands.java New Jersey resource implementing the cluster command-status functionality plus v1 bridging helpers.
solr/api/src/java/org/apache/solr/client/api/model/GetClusterCommandStatusResponse.java Adds typed response model for GET /api/cluster/commands/{requestId} with support for flattened async sub-responses.
solr/api/src/java/org/apache/solr/client/api/model/DeleteClusterCommandStatusResponse.java Adds response model for delete operations on stored async statuses.
solr/api/src/java/org/apache/solr/client/api/endpoint/GetNodeCommandStatusApi.java Updates docs to reference the new cluster async status path.
solr/api/src/java/org/apache/solr/client/api/endpoint/ClusterCommandsApi.java New v2 API contract for /cluster/commands operations (GET/DELETE single + DELETE all).
dev-docs/v2-api-conventions.adoc Adds /api/cluster/commands examples to the v2 REST path conventions list.
changelog/unreleased/SOLR-16390-cluster-command-status.yml Adds changelog entry documenting the API rename and the new SolrJ request helpers.
Review details
  • Files reviewed: 12/12 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat:api documentation Improvements or additions to documentation tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants