-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Increase search.max_buckets to 65,535 #57042
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
imotov
merged 13 commits into
elastic:master
from
imotov:issue-51731-increase-max-buckets
Jun 3, 2020
Merged
Changes from 7 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
5ab18c6
Increase search.max_buckets to 65,535
imotov 1041847
Remove unnecessary checks form reduce
imotov 625c6dd
Suppress number of buckets check in some aggregations
imotov fef7b26
Merge remote-tracking branch 'elastic/master' into issue-51731-increa…
imotov 8252b03
Cleanup after merge
imotov b871bcc
Merge remote-tracking branch 'elastic/master' into issue-51731-increa…
imotov eed4060
Suppress bucket count checks in more tests
imotov 8ec8048
Fix counter in BucketsAggregator
imotov 39e034a
Make sure that we still call breaker occasionally
imotov c9e2763
Merge remote-tracking branch 'elastic/master' into issue-51731-increa…
imotov 8870925
Fix HierarchyCircuitBreakerServiceTests
imotov 7a389ec
Merge remote-tracking branch 'elastic/master' into issue-51731-increa…
imotov 6bddc55
Add comment on collectExistingBucket
imotov 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
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
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
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
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.
Hm, I think this isn't quite right.
doc
is the doc ID, so that could be all over the place, and also all going into the same bucket. I think there are two options here:Down below, we do
if (docCounts.increment(bucketOrd, 1) == 1) { <breaker stuff> }
which I think will work because the increment method returns the count after incrementing. So if we have a doc count of 1, it's the first doc and a new bucket so we can account itAlternatively, we could just account for it up in
collectBucket
without a conditional, since theoretically that should only be called on new buckets. It's not guaranteed by the API but in practice that's how aggs use it.There are two other issues we need to address though:
BucketsAggregator
... if we add the 1024 threshold back, it's only a local count so aggs with 1023 buckets will never trigger the breaker even if the overall query has millions of buckets.Perhaps we continue to use the MultiBucketConsumer service thing, but move the breaker accounting to a different method? That way it could maintain the global count and BucketsAggregator just calls a method on it or something? Not sure, we can discuss more offline