Skip to content

Conversation

@sandeshkr419
Copy link
Member

@sandeshkr419 sandeshkr419 commented Oct 16, 2025

Description

Fix of type-casting issue when aggregator is wrapped in ProfilingAggregator. While setting sub-aggregators, we need to ensure that the unwrapped aggregator is passed back.

Also, refactored few pieces of the code to remove redundant methods.

Related Issues

Resolves #19649

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 added bug Something isn't working Search:Aggregations labels Oct 16, 2025
@sandeshkr419 sandeshkr419 changed the title [Bug Fix] [Star Tree] Fix sub-aggregator casting when used with profile=true [Bug Fix] [Star Tree] Fix sub-aggregator casting for search with profile=true Oct 16, 2025
@github-actions
Copy link
Contributor

❌ Gradle check result for bc8d931: 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?

@sandeshkr419 sandeshkr419 added the v3.4.0 Issues and PRs related to version 3.4.0 label Oct 16, 2025
@github-actions
Copy link
Contributor

✅ Gradle check result for b93e4c1: SUCCESS

@codecov
Copy link

codecov bot commented Oct 16, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.11%. Comparing base (5468936) to head (3fbcdb7).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
...opensearch/search/streaming/FlushModeResolver.java 33.33% 3 Missing and 1 partial ⚠️
...earch/profile/aggregation/ProfilingAggregator.java 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #19652      +/-   ##
============================================
+ Coverage     73.09%   73.11%   +0.02%     
+ Complexity    70723    70694      -29     
============================================
  Files          5725     5725              
  Lines        323796   323795       -1     
  Branches      46886    46882       -4     
============================================
+ Hits         236673   236742      +69     
+ Misses        68009    67973      -36     
+ Partials      19114    19080      -34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ajleong623
Copy link
Contributor

LGTM!

Copy link
Contributor

@ajleong623 ajleong623 left a comment

Choose a reason for hiding this comment

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

Approved!

@github-actions
Copy link
Contributor

✅ Gradle check result for 3fbcdb7: SUCCESS

@sandeshkr419 sandeshkr419 merged commit b9781c1 into opensearch-project:main Oct 16, 2025
35 of 56 checks passed
@github-project-automation github-project-automation bot moved this from In-Review to Done in Performance Roadmap Oct 16, 2025
@sandeshkr419 sandeshkr419 deleted the stprof branch October 16, 2025 19:30
@sandeshkr419 sandeshkr419 added the backport 3.3 Backport to 3.3 branch label Oct 16, 2025
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 16, 2025
…ile=true (#19652)

* fix sub-aggregator casting when used with profile=true

Signed-off-by: Sandesh Kumar <[email protected]>

---------

Signed-off-by: Sandesh Kumar <[email protected]>
(cherry picked from commit b9781c1)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
sandeshkr419 added a commit that referenced this pull request Oct 17, 2025
…earch with profile=true (#19669)

* [Bug Fix] [Star Tree] Fix sub-aggregator casting for search with profile=true (#19652)

* fix sub-aggregator casting when used with profile=true

Signed-off-by: Sandesh Kumar <[email protected]>

---------

Signed-off-by: Sandesh Kumar <[email protected]>
(cherry picked from commit b9781c1)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix changelog

Removed several fixed issues from CHANGELOG.

Signed-off-by: Sandesh Kumar <[email protected]>

---------

Signed-off-by: Sandesh Kumar <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sandesh Kumar <[email protected]>
rgsriram pushed a commit to rgsriram/OpenSearch that referenced this pull request Oct 18, 2025
…ile=true (opensearch-project#19652)

* fix sub-aggregator casting when used with profile=true

Signed-off-by: Sandesh Kumar <[email protected]>

---------

Signed-off-by: Sandesh Kumar <[email protected]>
kh3ra pushed a commit to kh3ra/OpenSearch that referenced this pull request Oct 23, 2025
…ile=true (opensearch-project#19652)

* fix sub-aggregator casting when used with profile=true

Signed-off-by: Sandesh Kumar <[email protected]>

---------

Signed-off-by: Sandesh Kumar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 3.3 Backport to 3.3 branch bug Something isn't working Search:Aggregations v3.4.0 Issues and PRs related to version 3.4.0

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[BUG] StarTree Profiling GlobalOrdinalsStringTermsAggregator sub aggregation

3 participants