Skip to content

delegate getMin/getMax methods for ExitableTerms - #20775

Merged
bugmakerrrrrr merged 3 commits into
opensearch-project:mainfrom
HUSTERGS:delegate_terms
Mar 10, 2026
Merged

delegate getMin/getMax methods for ExitableTerms#20775
bugmakerrrrrr merged 3 commits into
opensearch-project:mainfrom
HUSTERGS:delegate_terms

Conversation

@HUSTERGS

@HUSTERGS HUSTERGS commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Description

ExitableTerms should delegate getMin/getMax methods, or else the getMax() from

Terms terms = MultiTerms.getTerms(reader, fieldType.name());
if (terms == null) {
return null;
}
return terms.getMin() != null ? new MinAndMax<>(terms.getMin(), terms.getMax()) : null;

will call the default implementation, which is a slow path, and will get a flamegraph like below

image

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@github-actions

github-actions Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

(Review updated until commit 48e447d)

Here are some key observations to aid the review process:

🧪 No relevant tests
🔒 No security concerns identified
✅ No TODO sections
🔀 No multiple PR themes
⚡ Recommended focus areas for review

Formatting Error

The CHANGELOG entry has a double dash prefix (- -) instead of a single dash (-), which is a formatting mistake that should be corrected.

- - Delegate getMin/getMax methods for ExitableTerms ([#20775](https://github.com/opensearch-project/OpenSearch/pull/20775))

Signed-off-by: gesong.samuel <gesong.samuel@bytedance.com>
@github-actions

github-actions Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Persistent review updated to latest commit 2e85d39

@github-actions

github-actions Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

❌ Gradle check result for 2e85d39: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@bugmakerrrrrr bugmakerrrrrr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@github-actions

github-actions Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

❌ Gradle check result for 2e85d39: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions

github-actions Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

❌ Gradle check result for 2e85d39: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions

github-actions Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

❌ Gradle check result for 2e85d39: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions

github-actions Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

❌ Gradle check result for 2e85d39: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions

github-actions Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

❌ Gradle check result for 48e447d: null

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@HUSTERGS HUSTERGS closed this Mar 9, 2026
@HUSTERGS HUSTERGS reopened this Mar 9, 2026
@github-actions

github-actions Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

Persistent review updated to latest commit 48e447d

@github-actions

github-actions Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

❌ Gradle check result for 48e447d: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@HUSTERGS HUSTERGS closed this Mar 9, 2026
@HUSTERGS HUSTERGS reopened this Mar 9, 2026
@github-actions

github-actions Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

Persistent review updated to latest commit 48e447d

@github-actions

github-actions Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

❌ Gradle check result for 48e447d: null

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions

Copy link
Copy Markdown
Contributor

Persistent review updated to latest commit 48e447d

@github-actions

Copy link
Copy Markdown
Contributor

✅ Gradle check result for 48e447d: SUCCESS

@bugmakerrrrrr
bugmakerrrrrr merged commit dcbdefa into opensearch-project:main Mar 10, 2026
176 of 229 checks passed
aparajita31pandey pushed a commit to aparajita31pandey/OpenSearch that referenced this pull request Apr 18, 2026
…20775)

* delegate getMin/getMax for ExitableTerms

Signed-off-by: gesong.samuel <gesong.samuel@bytedance.com>

* fix conflict

Signed-off-by: gesong.samuel <gesong.samuel@bytedance.com>

---------

Signed-off-by: gesong.samuel <gesong.samuel@bytedance.com>
Signed-off-by: Aparajita Pandey <aparajita31pandey@gmail.com>
pradeep-L pushed a commit to pradeep-L/OpenSearch that referenced this pull request Apr 21, 2026
…20775)

* delegate getMin/getMax for ExitableTerms

Signed-off-by: gesong.samuel <gesong.samuel@bytedance.com>

* fix conflict

Signed-off-by: gesong.samuel <gesong.samuel@bytedance.com>

---------

Signed-off-by: gesong.samuel <gesong.samuel@bytedance.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants