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
Fix 2 bugs in children
agg
#10263
Closed
martijnvg
wants to merge
2
commits into
elastic:1.x
from
martijnvg:children_agg/broken_nested_usage_and_wrong_doc_counts
Closed
Fix 2 bugs in children
agg
#10263
martijnvg
wants to merge
2
commits into
elastic:1.x
from
martijnvg:children_agg/broken_nested_usage_and_wrong_doc_counts
Conversation
This file contains 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 was referenced Mar 25, 2015
@@ -66,7 +66,8 @@ | |||
private final LongObjectPagedHashMap<long[]> parentOrdToOtherBuckets; | |||
private boolean multipleBucketsPerParentOrd = false; | |||
|
|||
private List<AtomicReaderContext> replay = new ArrayList<>(); | |||
// This needs to be a Set to avoid duplicate reader context entries (#setNextReader(...) can get invoked multiple times with the same reader context) | |||
private Set<AtomicReaderContext> replay = new HashSet<>(); |
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.
I think it should be a LinkedHashSet since we rely on doc ID order for tie-breaking.
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.
good point, I'll change that
LGTM |
martijnvg
force-pushed
the
children_agg/broken_nested_usage_and_wrong_doc_counts
branch
from
March 28, 2015 07:14
56fefc8
to
eb8eb74
Compare
This also fixes a NPE when the nested part has been filtered out of the _source, because of _source filtering. Closes elastic#9766
martijnvg
force-pushed
the
children_agg/broken_nested_usage_and_wrong_doc_counts
branch
from
March 28, 2015 07:35
eb8eb74
to
fd61eda
Compare
1) multiple nested children aggs result in a NPE 2) fixed a counting bug where the same readers where post collected twice Closes elastic#10158
martijnvg
force-pushed
the
children_agg/broken_nested_usage_and_wrong_doc_counts
branch
from
March 28, 2015 07:47
fd61eda
to
29058c7
Compare
pushed to master, 1.x and 1.5 |
martijnvg
deleted the
children_agg/broken_nested_usage_and_wrong_doc_counts
branch
May 18, 2015 23:26
clintongormley
changed the title
children aggregation: Fix 2 bugs in
Fix 2 bugs in Jun 8, 2015
children
aggchildren
agg
clintongormley
added
:Search/Search
Search-related issues that do not fall into other categories
and removed
:Parent/Child
labels
Feb 14, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
>bug
:Search/Search
Search-related issues that do not fall into other categories
v1.5.1
v1.6.0
v2.0.0-beta1
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.
PR for #10158
Note this PR is against 1.x b/c bug 1 is fixed in master already. This bug fix was part of a refactoring that happened as part of #9544