Skip to content

SOLR-6122 POC new cancel handler for Collections api #3033

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from

Conversation

QFREEE
Copy link
Contributor

@QFREEE QFREEE commented Jan 14, 2025

https://issues.apache.org/jira/browse/SOLR-6122

Description

This PR implemented a new overseer level message handler to cancel submitted & in-progress collections api calls. As an example, this PR only opt-in backup collection api for in-progress cancel.

in-progress collections api calls are not complete, as core level cancel is not implemented. Current implemention removes tracking of in-progress collections api from overseers, which can be useful in some situation like backup.

Solution

General flow:
-> Client request cancle with async ID through
http://localhost:8983/solr/admin/collections?action=CANCEL&requestid=1

-> Cancel message handled by OverseerCancelMessageHandler to determine if this asyncId exist and if it's currently in submitted or in-progress state :

  • if submitted: remove from workQueue and clear blockedTasks in case submitted task is in blocked tasks
  • if in-progress: check if is isInProgressCancelable -> remove in-progress tasks from tracking queues in overseer workQueue & runningMap & runningTasks

Api:
New V2 api interface for cancel handler

Overseer:

  • stored asyncId on to ZK's running map to keep track of in-process async task easier
  • Adjust OverseerTaskQueue to handle remove / get item from queue given zk path

OverseerCancelMessageHandler:

  • a new message handler specifically to handle cancel. Since cancel collections api involovs removing queue event from overseer's queue, added this part of logic as message handler instead of a new collection api

Tests

Test locally through CURL, working on testing

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide

@QFREEE QFREEE changed the title SOLR-6122 POC new cancel handler for SOLR-6122 SOLR-6122 POC new cancel handler for Collections api Jan 14, 2025
QFREEE and others added 2 commits January 28, 2025 16:33
…eerCancelMessageHandler.java

Co-authored-by: Christine Poerschke <[email protected]>
@QFREEE
Copy link
Contributor Author

QFREEE commented Feb 18, 2025

@dsmiley hi David, you might be interested in this PR

@dsmiley
Copy link
Contributor

dsmiley commented Mar 2, 2025

I might be interested but I confess I'm very biased to see the Overseer die. Adding a feature to it is the opposite of that.

Copy link

github-actions bot commented May 2, 2025

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 [email protected] 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 May 2, 2025
Copy link

github-actions bot commented Jul 2, 2025

This PR is now closed due to 60 days of inactivity after being marked as stale. Re-opening this PR is still possible, in which case it will be marked as active again.

@github-actions github-actions bot added the closed-stale Closed after being stale for 60 days label Jul 2, 2025
@github-actions github-actions bot closed this Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat:api cat:cloud client:solrj closed-stale Closed after being stale for 60 days stale PR not updated in 60 days
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants