Fix TopGroupsCollectorManager ignoring withinGroupOffset#15995
Merged
Conversation
Signed-off-by: Binlong Gao <gbinlong@amazon.com>
Signed-off-by: Binlong Gao <gbinlong@amazon.com>
Contributor
Author
|
Hi @javanna , could you help to review this PR? Thanks! |
javanna
approved these changes
Apr 30, 2026
Contributor
javanna
left a comment
There was a problem hiding this comment.
I left a couple of small comments, LGTM otherwise
Signed-off-by: Binlong Gao <gbinlong@amazon.com>
Signed-off-by: Binlong Gao <gbinlong@amazon.com>
Contributor
Author
javanna
pushed a commit
that referenced
this pull request
May 4, 2026
When testing the newly introduced TopGroupsCollectorManager in #15603, found that TopGroupsCollectorManager hardcoded 0 as the withinGroupOffset when calling TopGroups.merge(), causing pagination within groups to be silently ignored, this PR adds withinGroupOffset field and constructor parameter into TopGroupsCollectorManager, also modify the unit test to make it cover non-zero withinGroupOffset case. In addition, simplify the TopGroupsCollectorManager.reduce() method. Signed-off-by: Binlong Gao <gbinlong@amazon.com>
Contributor
|
Merged and backported, thanks @gaobinlong ! |
javanna
added a commit
that referenced
this pull request
May 4, 2026
The collectors arraylist is no longer needed. This commit removes it.
sgup432
pushed a commit
to sgup432/lucene
that referenced
this pull request
May 4, 2026
When testing the newly introduced TopGroupsCollectorManager in apache#15603, found that TopGroupsCollectorManager hardcoded 0 as the withinGroupOffset when calling TopGroups.merge(), causing pagination within groups to be silently ignored, this PR adds withinGroupOffset field and constructor parameter into TopGroupsCollectorManager, also modify the unit test to make it cover non-zero withinGroupOffset case. In addition, simplify the TopGroupsCollectorManager.reduce() method. Signed-off-by: Binlong Gao <gbinlong@amazon.com>
sgup432
pushed a commit
to sgup432/lucene
that referenced
this pull request
May 4, 2026
The collectors arraylist is no longer needed. This commit removes it.
Contributor
|
This commit broke tests on branch_10x - they can be reproduced. I suspect it's a test problem somewhere but didn't look closely. |
dweiss
added a commit
that referenced
this pull request
May 6, 2026
Contributor
|
Seems like a test regression, I've fixed it by reverting what's on main. |
Contributor
|
Thanks @dweiss for fixing. I had merge conflicts when backporting and overlooked this test. Looks good now. |
Contributor
Author
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.
Description
When testing the newly introduced TopGroupsCollectorManager in this PR, found that TopGroupsCollectorManager hardcoded 0 as the
withinGroupOffsetwhen calling TopGroups.merge(), causing pagination within groups to be silently ignored, this PR addswithinGroupOffsetfield and constructor parameter into TopGroupsCollectorManager, also modify the unit test to make it cover non-zerowithinGroupOffsetcase.In addition, simplify the TopGroupsCollectorManager.reduce() method.