SOLR-18248: Migration of CancelTask V2 API to JAX-RS construct - #4828
SOLR-18248: Migration of CancelTask V2 API to JAX-RS construct#4828jaykay12 wants to merge 83 commits into
Conversation
| "/tasks/cancel": { | ||
| "class": "solr.QueryCancellationHandler", | ||
| "class": "solr.TaskCancellationHandler", | ||
| "useParams":"_TASK_CANCELLATION", |
There was a problem hiding this comment.
the fact that this was called _TASK__CONCELLATION already is some good evidence that our renaming is headed int he right direction!
There was a problem hiding this comment.
Okay, caan you look the components that are defined in this? I poked aroudn a bit and I think that the "components" defined in this file aren't actually needed anymore or used.... Both for the cancel handler and the list tasks handler below.. Can you investigate and see if this is old dead code, maybe from our previous work to migrate tasks? I don't think it breaks anything, but since we are in here, we should clean this up.
There was a problem hiding this comment.
yes, majorly all cleanup has been done related with this migration alongside only, there looks like no other scope of cleanup here right now.
epugh
left a comment
There was a problem hiding this comment.
Getting closer! Some comments on two things to change.
| "/tasks/cancel": { | ||
| "class": "solr.QueryCancellationHandler", | ||
| "class": "solr.TaskCancellationHandler", | ||
| "useParams":"_TASK_CANCELLATION", |
There was a problem hiding this comment.
Okay, caan you look the components that are defined in this? I poked aroudn a bit and I think that the "components" defined in this file aren't actually needed anymore or used.... Both for the cancel handler and the list tasks handler below.. Can you investigate and see if this is old dead code, maybe from our previous work to migrate tasks? I don't think it breaks anything, but since we are in here, we should clean this up.
There was a problem hiding this comment.
Pull request overview
Migrates the V2 task-cancellation API to JAX-RS while retaining V1 compatibility and distributed cancellation.
Changes:
- Adds the typed
DELETE /tasks/{taskID}endpoint and response model. - Consolidates local and distributed task operations.
- Updates registration, tests, documentation, and changelog.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
task-management.adoc |
Documents the V2 cancellation endpoint. |
CancelTaskTest.java |
Tests local cancellation behavior. |
SolrCoreTest.java |
Updates implicit-handler assertion. |
ImplicitPlugins.json |
Registers the replacement handler. |
TaskManagementHandler.java |
Removes obsolete component dispatch. |
TaskCancellationHandler.java |
Preserves V1 and registers JAX-RS. |
QueryCancellationComponent.java |
Removes legacy cancellation component. |
ActiveTaskQuerySupport.java |
Adds shared distributed cancellation. |
CancelTaskAPI.java |
Removes legacy annotated V2 API. |
CancelTask.java |
Implements the JAX-RS resource. |
CancelTaskResponse.java |
Adds the typed response model. |
TasksApi.java |
Defines the DELETE endpoint contract. |
SOLR-18248-cancel-tasks.yml |
Adds the changelog entry. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…t, then we are stuck with this in v1
|
Okay, I think this is finally ready. I DID end up looking across all the TaskManagement apis in this, I guess maybe should have pushed to get the CancelTask in, and then in a seperate PR... but ohwell. |
https://issues.apache.org/jira/browse/SOLR-18248
Description
Migration of Cancel Task V2 API into JAX-RS Construct
Solution
No AI Usage.
Tests
Please describe the tests you've developed or run to confirm this patch implements the feature or solves the problem.
Checklist
Please review the following and check all that apply:
mainbranch../gradlew check.