Skip to content

Conversation

@opensearch-trigger-bot
Copy link
Contributor

Backport f9c239d from #16771.

* Filter shards for sliced search at coordinator

Prior to this commit, a sliced search would fan out to every shard,
then apply a MatchNoDocsQuery filter on shards that don't correspond
to the current slice. This still creates a (useless) search context
on each shard for every slice, though. For a long-running sliced
scroll, this can quickly exhaust the number of available scroll
contexts.

This change avoids fanning out to all the shards by checking at the
coordinator if a shard is matched by the current slice. This should
reduce the number of open scroll contexts to max(numShards, numSlices)
instead of numShards * numSlices.

---------

Signed-off-by: Michael Froh <[email protected]>
(cherry picked from commit f9c239d)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@github-actions
Copy link
Contributor

❌ Gradle check result for 32f689e: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@reta reta force-pushed the backport/backport-16771-to-2.x branch from c7ada28 to 72ed864 Compare January 15, 2025 15:44
@github-actions
Copy link
Contributor

❌ Gradle check result for 72ed864: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

✅ Gradle check result for 72ed864: SUCCESS

@codecov
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

Attention: Patch coverage is 71.73913% with 13 lines in your changes missing coverage. Please review.

Project coverage is 71.96%. Comparing base (0f8b032) to head (72ed864).
Report is 2 commits behind head on 2.x.

Files with missing lines Patch % Lines
...min/cluster/shards/ClusterSearchShardsRequest.java 58.33% 3 Missing and 2 partials ⚠️
...n/admin/cluster/RestClusterSearchShardsAction.java 0.00% 5 Missing ⚠️
...pensearch/action/search/TransportSearchAction.java 75.00% 1 Missing ⚠️
...g/opensearch/cluster/routing/OperationRouting.java 92.85% 1 Missing ⚠️
...java/org/opensearch/search/slice/SliceBuilder.java 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                2.x   #17025      +/-   ##
============================================
+ Coverage     71.83%   71.96%   +0.12%     
- Complexity    65588    65683      +95     
============================================
  Files          5318     5318              
  Lines        305779   305807      +28     
  Branches      44583    44596      +13     
============================================
+ Hits         219653   220061     +408     
+ Misses        67817    67388     -429     
- Partials      18309    18358      +49     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant