SOLR-16390: Move cluster command-status APIs to /cluster/commands - #4866
Open
iprithv wants to merge 2 commits into
Open
SOLR-16390: Move cluster command-status APIs to /cluster/commands#4866iprithv wants to merge 2 commits into
iprithv wants to merge 2 commits into
Conversation
Signed-off-by: prithvi <prithvisivasankar@gmail.com>
Contributor
Contributor
|
this api is purely client side, and there are no changes to the V1 approach. This should be pretty low risk. |
Contributor
There was a problem hiding this comment.
🟢 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}andDELETE /api/cluster/commands. - Refactors v1
REQUESTSTATUS/DELETESTATUSoperations 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renames the v2 cluster async-command APIs to be more REST-ful, and converts them from the homegrown
@EndPointwrappers to JAX-RS.