Merged
Conversation
Collaborator
|
Pinging @elastic/es-security (Team:Security) |
jpountz
approved these changes
Jan 13, 2022
| final Terms fieldNameTerms = super.terms(FieldNamesFieldMapper.NAME); | ||
| this.fieldNamesFilterTerms = Optional.ofNullable( | ||
| fieldNameTerms == null ? null : new FieldNamesTerms(fieldNameTerms) | ||
| ); |
Contributor
There was a problem hiding this comment.
nit: it feels a bit weird to use Optional.ofNullable when you need to check for null already anyway, what about something like that instead?
this.fieldNamesFilterTerms = fieldNameTerms == null ? Optional.empty() : Optional.of(new FieldNamesTerms(fieldNameTerms));| return fieldNamesFilterTerms; | ||
| if (fieldNamesFilterTerms == null) { | ||
| synchronized (this) { | ||
| if (fieldNamesFilterTerms == null) { |
Contributor
There was a problem hiding this comment.
can you leave a comment that explains why this is computed lazily?
Contributor
Author
|
Thanks @jpountz! |
ywelsch
added a commit
to ywelsch/elasticsearch
that referenced
this pull request
Jan 13, 2022
Field level security was interacting in bad ways with the can-match phase on frozen tier shards (interaction between FieldSubsetReader and RewriteCachingDirectoryReader). This made can-match phase fail, which in the normal case would result in extra load on the frozen tier, and in the extreme case (in interaction with elastic#51708) made searches fail. This is a bug that was indirectly introduced by elastic#78988. Closes elastic#82044
Collaborator
ywelsch
added a commit
to ywelsch/elasticsearch
that referenced
this pull request
Jan 13, 2022
Field level security was interacting in bad ways with the can-match phase on frozen tier shards (interaction between FieldSubsetReader and RewriteCachingDirectoryReader). This made can-match phase fail, which in the normal case would result in extra load on the frozen tier, and in the extreme case (in interaction with elastic#51708) made searches fail. This is a bug that was indirectly introduced by elastic#78988. Closes elastic#82044
ywelsch
added a commit
that referenced
this pull request
Jan 14, 2022
Field level security was interacting in bad ways with the can-match phase on frozen tier shards (interaction between FieldSubsetReader and RewriteCachingDirectoryReader). This made can-match phase fail, which in the normal case would result in extra load on the frozen tier, and in the extreme case (in interaction with #51708) made searches fail. This is a bug that was indirectly introduced by #78988. Closes #82044
ywelsch
added a commit
that referenced
this pull request
Jan 14, 2022
Field level security was interacting in bad ways with the can-match phase on frozen tier shards (interaction between FieldSubsetReader and RewriteCachingDirectoryReader). This made can-match phase fail, which in the normal case would result in extra load on the frozen tier, and in the extreme case (in interaction with #51708) made searches fail. This is a bug that was indirectly introduced by #78988. Closes #82044 Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Field level security was interacting in bad ways with the can-match phase on frozen tier shards (interaction between
FieldSubsetReaderandRewriteCachingDirectoryReader). This made can-match phase fail, which in the normal case would result in extra load on the frozen tier, and in the extreme case (in interaction with #51708) made searches fail.This is a bug that was indirectly introduced by #78988.
Closes #82044