Skip to content

fix: implement makeAggregateCombiner for momentSketch - #20413

Merged
FrankChen021 merged 1 commit into
apache:masterfrom
kdelay:fix/issue-13220-momentsketch-combiner
Sep 26, 2026
Merged

FrankChen021 merged 1 commit into
apache:masterfrom
kdelay:fix/issue-13220-momentsketch-combiner

Conversation

@kdelay

@kdelay kdelay commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Fixes #13220.

Description

MomentSketchAggregatorFactory had no makeAggregateCombiner(), so rollup ingestion that persists more than one intermediate index failed in IndexMergerV9 with the UOE from the issue. The existing test never merged: the data rolls up to 9 rows and maxRowCount is 10.

The combiner follows TDigestSketchAggregatorFactory: reset starts a new sketch with the factory's k and compress, and fold merges into it, never into the selector's object.

Tests: an ingestion test with maxRowCount 3, and a unit test for the combiner. Both fail with the UOE without the fix. The module tests (29), checkstyle and forbiddenapis pass.

Release note

Fixed rollup ingestion with momentSketch metrics failing during index merge.

Rollup ingestion that persists more than one intermediate index merges
them through RowCombiningTimeAndDimsIterator, which needs an
AggregateCombiner. MomentSketchAggregatorFactory did not provide one,
so the merge failed with UOE.

Fixes apache#13220

@FrankChen021 FrankChen021 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🟢 Approval recommended

Reviewed 3 of 3 changed files.

The new combiner follows the AggregateCombiner contract by accumulating into a fresh MomentSketchWrapper, preserving source segment objects while handling null selectors. The added factory-level test covers multi-sketch folding and source immutability, and the ingestion test exercises rollup across persisted indexes. I found no actionable correctness, compatibility, concurrency, security, or data-loss issues in the current diff.


This is an automated review by Codex GPT-5.6-Luna(max)

@kdelay

kdelay commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review. The one red check (QTest 1/4) failed during dependency resolution: repo.maven.apache.org returned HTTP 429 Too Many Requests before any test ran (job 107442169669). This PR only touches the momentsketch extension. Could someone with access re-run that job?

@FrankChen021
FrankChen021 merged commit e16bbf8 into apache:master Sep 26, 2026
26 of 27 checks passed
@github-actions github-actions Bot added this to the 39.0.0 milestone Sep 26, 2026
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.

MomentSketchAggregatorFactory doesn't implement makeAggregateCombiner

2 participants