Skip to content

Add a checkCancelled public method to ContextIndexSearcher #130645

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kvanerum
Copy link
Contributor

@kvanerum kvanerum commented Jul 4, 2025

Resolves #121349

Added a checkCancelled() method to ContextIndexSearcher

@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label external-contributor Pull request authored by a developer outside the Elasticsearch team v9.2.0 labels Jul 4, 2025
@PeteGillinElastic PeteGillinElastic added :Search Foundations/Search Catch all for Search Foundations and removed needs:triage Requires assignment of a team area label labels Jul 11, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-foundations (Team:Search Foundations)

@elasticsearchmachine elasticsearchmachine added the Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch label Jul 11, 2025
Copy link
Member

@javanna javanna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this PR, I left a comment.

@@ -191,6 +191,12 @@ public boolean hasCancellations() {
return this.cancellable.isEnabled();
}

public void checkCancelled() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add javadocs please?

I am a bit worried that we may end up removing it in the future, because it's used only in tests. Are there other places in prod code where this method may be used perhaps? Could you comment on the fact that it's handy to have for plugins and explain the usecase so that does not get lost? Thanks!

@javanna javanna self-assigned this Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement external-contributor Pull request authored by a developer outside the Elasticsearch team :Search Foundations/Search Catch all for Search Foundations Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a checkCancelled public method to ContextIndexSearcher
4 participants