Skip to content

Skip heavy TreeSet opts for the first group in SearchGroup#merge#15896

Open
gaobinlong wants to merge 3 commits intoapache:mainfrom
gaobinlong:skipHeavyOpts2
Open

Skip heavy TreeSet opts for the first group in SearchGroup#merge#15896
gaobinlong wants to merge 3 commits intoapache:mainfrom
gaobinlong:skipHeavyOpts2

Conversation

@gaobinlong
Copy link
Copy Markdown
Contributor

@gaobinlong gaobinlong commented Mar 31, 2026

Description

Similar to #15128, when merging groups across shards in SearchGroup#merge, we can update the first group in the min-heap in place when more competitive sort values are found.

Benchmark test on wikimedium10k:

TaskQPS baseline      StdDevQPS my_modified_version      StdDev                Pct diff
p-value
                    TermGroup10K      125.15      (7.3%)      128.31      (8.6%)    2.5% ( -12% -   19%) 0.317
                     TermGroup1M      130.04     (10.5%)      133.37     (11.6%)    2.6% ( -17% -   27%) 0.463
                    TermGroup100      156.47     (10.8%)      165.87      (9.7%)    6.0% ( -13% -   29%) 0.064

Signed-off-by: Binlong Gao <gbinlong@amazon.com>
@github-actions github-actions bot added this to the 10.5.0 milestone Mar 31, 2026
Signed-off-by: Binlong Gao <gbinlong@amazon.com>
@gaobinlong
Copy link
Copy Markdown
Contributor Author

Hi @benwtrent , could you help to review this PR? Thanks!

Copy link
Copy Markdown
Contributor

@jainankitk jainankitk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me!

Signed-off-by: Binlong Gao <gbinlong@amazon.com>
@gaobinlong
Copy link
Copy Markdown
Contributor Author

Thanks! @jainankitk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants