Skip to content

[9.0] Cancel expired async search task when a remote returns its results (#126583) #126915

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

Merged
merged 1 commit into from
Apr 16, 2025

Conversation

javanna
Copy link
Member

@javanna javanna commented Apr 16, 2025

Backports the following commits to 9.0:

…lastic#126583)

A while ago we enabled using ccs_minimize_roundtrips in async search.
This makes it possible for users of async search to send a single search
request per remote cluster, and minimize the impact of network latency.

With non minimized roundtrips, we have pretty recurring cancellation checks:
as part of the execution, we detect that a task expired whenever each shard comes
back with its results.

In a scenario where the coord node does not hold data, or only remote data is
targeted by an async search, we have much less chance of detecting cancellation
if roundtrips are minimized. The local coordinator would do nothing other than
waiting for the minimized results from each remote cluster.
One scenario where we can check for cancellation is when each cluster comes
back with its full set of results. This commit adds such check, plus some testing
for async search cancellation with minimized roundtrips.
@javanna javanna added :Search Foundations/CCS >bug auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch labels Apr 16, 2025
@elasticsearchmachine elasticsearchmachine merged commit d4c1f40 into elastic:9.0 Apr 16, 2025
16 checks passed
@javanna javanna deleted the backport/9.0/pr-126583 branch April 16, 2025 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug :Search Foundations/CCS Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v9.0.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants