-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Change successfulSearchShardIndices to Set<Index> #16110
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16110 +/- ##
============================================
+ Coverage 71.94% 72.03% +0.08%
- Complexity 64612 64729 +117
============================================
Files 5298 5301 +3
Lines 301952 302355 +403
Branches 43627 43681 +54
============================================
+ Hits 217247 217805 +558
+ Misses 66884 66704 -180
- Partials 17821 17846 +25 ☔ View full report in Codecov by Sentry. |
9a5dac6
to
3ce3c96
Compare
@dzane17 could you please provide more context behind this change: why do you need to expose the IndicesService to plugins? thank you |
Got it, thanks @jainankitk , so here is the way we could make it work, which is a bit cumbersome but solves the dependency problem, the
Since
|
51f28cd
to
c063ae3
Compare
server/src/main/java/org/opensearch/action/admin/cluster/stats/MappingVisitor.java
Outdated
Show resolved
Hide resolved
Thanks all for the input. Since indicesService does not contain mappings for ALL indices in the cluster, we have no choice but to retrieve mappings from cluster state. This involves some clunky map parsing so we will introduce a small cache in Query-Insights to limit the frequency of this field->fieldType lookup. ClusterService is already present in the plugin createComponents method so I have reduced this PR to remaining structural changes needed in core. |
Signed-off-by: David Zane <[email protected]>
c063ae3
to
0d3f7ba
Compare
server/src/main/java/org/opensearch/action/search/SearchRequestContext.java
Show resolved
Hide resolved
Signed-off-by: Ankit Jain <[email protected]>
❌ Gradle check result for a489774: 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? |
Signed-off-by: Ankit Jain <[email protected]>
❌ Gradle check result for 058fb78: 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? |
Seems due to caching changes:
@sgup432 - Can you take a look at this? |
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-16110-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 5279d21f8c85e78a91159af6e17e52789355f2a4
# Push it to GitHub
git push --set-upstream origin backport/backport-16110-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x Then, create a pull request where the |
…#16110) Signed-off-by: David Zane <[email protected]> Signed-off-by: Ankit Jain <[email protected]> (cherry picked from commit 5279d21)
Signed-off-by: David Zane <[email protected]> Signed-off-by: Ankit Jain <[email protected]> (cherry picked from commit 5279d21)
…#16110) * Change successfulSearchShardIndices to Set<Index> Signed-off-by: David Zane <[email protected]> * Update CHANGELOG.md Signed-off-by: Ankit Jain <[email protected]> --------- Signed-off-by: David Zane <[email protected]> Signed-off-by: Ankit Jain <[email protected]> Co-authored-by: Ankit Jain <[email protected]>
…#16110) * Change successfulSearchShardIndices to Set<Index> Signed-off-by: David Zane <[email protected]> * Update CHANGELOG.md Signed-off-by: Ankit Jain <[email protected]> --------- Signed-off-by: David Zane <[email protected]> Signed-off-by: Ankit Jain <[email protected]> Co-authored-by: Ankit Jain <[email protected]>
…#16110) * Change successfulSearchShardIndices to Set<Index> Signed-off-by: David Zane <[email protected]> * Update CHANGELOG.md Signed-off-by: Ankit Jain <[email protected]> --------- Signed-off-by: David Zane <[email protected]> Signed-off-by: Ankit Jain <[email protected]> Co-authored-by: Ankit Jain <[email protected]>
Description
Change successfulSearchShardIndices to
Set<Index>
Passing the entire Index object allows greater flexibility over index String names. successfulSearchShardIndices is used in the Query Insights plugin to determine query field types.
Related Issues
RFC opensearch-project/query-insights#69
PR opensearch-project/query-insights#130
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.