-
Notifications
You must be signed in to change notification settings - Fork 25.8k
ES-12295 [S2D30] Painless/execute in CPS requires qualified index expression #138435
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
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
25edb45
ES-12295 [S2D30] Painless/execute in CPS requires qualified index exp…
alexey-ivanov-es bb327cf
Spotless
alexey-ivanov-es d5b3ab1
JavaDoc
alexey-ivanov-es 336bd11
Unit test
alexey-ivanov-es 56a310b
Support only one index for SingleIndexNoWildcards and change how indi…
alexey-ivanov-es 60d9fa4
Merge branch 'main' into ES-12295
alexey-ivanov-es 49eb95f
Remove volatile
alexey-ivanov-es 31f2c60
Merge branch 'main' into ES-12295
alexey-ivanov-es 6a20f4c
Merge branch 'main' into ES-12295
alexey-ivanov-es f916395
Merge branch 'main' into ES-12295
alexey-ivanov-es 4e1052a
Merge branch 'main' into ES-12295
alexey-ivanov-es 8ef2c0a
Merge branch 'main' into ES-12295
alexey-ivanov-es 8b37767
Merge branch 'main' into ES-12295
alexey-ivanov-es File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -118,6 +118,20 @@ interface SingleIndexNoWildcards extends IndicesRequest, CrossProjectCandidate { | |
| default boolean allowsRemoteIndices() { | ||
| return true; | ||
| } | ||
|
|
||
| /** | ||
| * Determines whether the request type allows cross-project processing. Cross-project processing entails cross-project search | ||
| * index resolution and error handling. Note: this method only determines in the request _supports_ cross-project. | ||
| * Whether cross-project processing is actually performed is determined by {@link IndicesOptions}. | ||
| */ | ||
| default boolean allowsCrossProject() { | ||
| return true; | ||
| } | ||
|
Comment on lines
+122
to
+129
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We making change so that UIAM authentication and authorized project resolution are separated from CPS index resolution so that they can be available for more request types. Please refer to the relevant change for this file here. Thanks! |
||
|
|
||
| /** | ||
| * Marks request local. Local requests should be processed on the same cluster, even if they have cluster-alias prefix. | ||
| */ | ||
| void markOriginOnly(); | ||
| } | ||
|
|
||
| /** | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do you handle
_origin:myindex? Will it ("_origin") have been stripped off before this is called? OtherwiseRemoteClusterAware.isRemoteIndexName("_origin:myindex)would return true right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The flow is:
IndicesAndAliasesResolver, we check if the request isSingleIndexNoWildcardsandindicesOptions().resolveCrossProjectIndexExpression()_originor has origin alias prefix)setLocal(true)which strips off the cluster alias from the index in the requestSo the cluster alias stripping happens during the security action filter call. This differs from my original approach, but I think it's the best way since we have the origin alias available there but not when
executeis called on the transport action.