SOLR-16390: Move cluster command-status APIs to /cluster/commands - #4866
SOLR-16390: Move cluster command-status APIs to /cluster/commands#4866iprithv wants to merge 2 commits into
Conversation
Signed-off-by: prithvi <prithvisivasankar@gmail.com>
|
this api is purely client side, and there are no changes to the V1 approach. This should be pretty low risk. |
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.
Thanks for the review, and for the enum change. I looked it over and it looks good. |
Renames the v2 cluster async-command APIs to be more REST-ful, and converts them from the homegrown
@EndPointwrappers to JAX-RS.