Skip to content

Fix SegmentPurger to prevent unintended star-tree modification during purge#17822

Open
praveenc7 wants to merge 4 commits intoapache:masterfrom
praveenc7:fix-startree-purge
Open

Fix SegmentPurger to prevent unintended star-tree modification during purge#17822
praveenc7 wants to merge 4 commits intoapache:masterfrom
praveenc7:fix-startree-purge

Conversation

@praveenc7
Copy link
Contributor

@praveenc7 praveenc7 commented Mar 5, 2026

Summary

  • When PurgeTask rebuilds a segment (after purging compliance/late-event records), SegmentPurger creates a new segment via SegmentGeneratorConfig which unconditionally picks up starTreeIndexConfigs from the table config. This causes old segments to unexpectedly gain star-tree indexes during purge, even when enableDynamicStarTreeCreation is false.
  • This change makes SegmentPurger.initSegmentGeneratorConfig() respect enableDynamicStarTreeCreation — if it's false (default), star-tree configs are cleared before segment generation, preventing unintended star-tree add/remove/modify during purge rebuilds.

#17821

Test plan

unit test

@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 93.93939% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.28%. Comparing base (3ca14f9) to head (bf933ee).

Files with missing lines Patch % Lines
.../org/apache/pinot/core/startree/StarTreeUtils.java 92.30% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #17822      +/-   ##
============================================
+ Coverage     63.20%   63.28%   +0.08%     
  Complexity     1456     1456              
============================================
  Files          3188     3188              
  Lines        191736   191768      +32     
  Branches      29347    29354       +7     
============================================
+ Hits         121178   121365     +187     
+ Misses        61067    60908     -159     
- Partials       9491     9495       +4     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-11 63.25% <93.93%> (+0.07%) ⬆️
java-21 63.19% <93.93%> (+0.01%) ⬆️
temurin 63.28% <93.93%> (+0.08%) ⬆️
unittests 63.28% <93.93%> (+0.08%) ⬆️
unittests1 55.60% <93.93%> (+0.04%) ⬆️
unittests2 34.17% <0.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

3 participants