Skip to content

Remove deprecated _segmentPushType and _segmentPushFrequency from TableConfigBuilder#18472

Open
Akanksha-kedia wants to merge 2 commits into
apache:masterfrom
Akanksha-kedia:fix-remove-deprecated-segment-push-fields
Open

Remove deprecated _segmentPushType and _segmentPushFrequency from TableConfigBuilder#18472
Akanksha-kedia wants to merge 2 commits into
apache:masterfrom
Akanksha-kedia:fix-remove-deprecated-segment-push-fields

Conversation

@Akanksha-kedia
Copy link
Copy Markdown
Contributor

Summary

Closes #17072 (supersedes and expands the original PR per reviewer feedback from @xiangfu0).

The @Deprecated _segmentPushType and _segmentPushFrequency fields, their associated private constants (DEFAULT_SEGMENT_PUSH_TYPE, REFRESH_SEGMENT_PUSH_TYPE), the deprecated setter methods (setSegmentPushType, setSegmentPushFrequency), and their forwarding in build() have all been removed from TableConfigBuilder.

The authoritative path for these values is IngestionConfig → BatchIngestionConfig → segmentIngestionType / segmentIngestionFrequency. TableConfigUtils.repairTableConfig() already migrates any legacy persisted configs (read from ZK) that carry these values in SegmentsValidationAndRetentionConfig.

Callers updated

File Change
HelixExternalViewBasedQueryQuotaManagerTest Remove 6 redundant .setSegmentPushType("APPEND") calls — irrelevant to quota logic
MultiStageEngineIntegrationTest Remove 1 redundant .setSegmentPushType("APPEND") call
TimeBoundaryManagerTest Set segmentPushFrequency directly on the validation config to simulate a legacy table config
TableConfigUtilsTest.testConvertFromLegacyTableConfig Set push type/frequency directly on the validation config, matching how legacy configs are stored on disk, then verify convertFromLegacyTableConfig migrates them correctly

Test plan

  • TableConfigUtilsTest.testConvertFromLegacyTableConfig passes — migration of legacy validation-config push type/frequency still works
  • TimeBoundaryManagerTest passes — push frequency is still propagated correctly
  • HelixExternalViewBasedQueryQuotaManagerTest passes — quota logic unaffected

…leConfigBuilder

The fields, their constants, and the deprecated setter methods have been removed from
TableConfigBuilder. The authoritative path for these values is now
IngestionConfig -> BatchIngestionConfig -> segmentIngestionType/segmentIngestionFrequency,
which is enforced by TableConfigUtils.repairTableConfig() for any legacy persisted configs.

Callers updated:
- HelixExternalViewBasedQueryQuotaManagerTest: remove redundant .setSegmentPushType("APPEND")
  calls — APPEND is implicit and irrelevant to quota logic
- MultiStageEngineIntegrationTest: same
- TimeBoundaryManagerTest: set segmentPushFrequency directly on the validation config to
  simulate a legacy table config for the time-boundary frequency tests
- TableConfigUtilsTest.testConvertFromLegacyTableConfig: set push type/frequency directly
  on the validation config, matching how legacy configs are actually stored on disk
@Akanksha-kedia Akanksha-kedia force-pushed the fix-remove-deprecated-segment-push-fields branch from aff9746 to e8614a7 Compare May 12, 2026 11:27
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.68%. Comparing base (7fe517a) to head (469afbc).
⚠️ Report is 16 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18472      +/-   ##
============================================
- Coverage     63.68%   63.68%   -0.01%     
  Complexity     1684     1684              
============================================
  Files          3262     3266       +4     
  Lines        199826   199836      +10     
  Branches      31031    31023       -8     
============================================
- Hits         127264   127256       -8     
- Misses        62414    62429      +15     
- Partials      10148    10151       +3     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-21 63.68% <ø> (-0.01%) ⬇️
temurin 63.68% <ø> (-0.01%) ⬇️
unittests 63.67% <ø> (-0.01%) ⬇️
unittests1 55.83% <ø> (+0.07%) ⬆️
unittests2 34.94% <ø> (-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.

Copy link
Copy Markdown
Contributor

@xiangfu0 xiangfu0 left a comment

Choose a reason for hiding this comment

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

Found one high-signal compatibility issue; see inline comment.

…ite-through

IngestionConfigUtils.getSegmentIngestionType/Frequency() still fall back to
validationConfig.getSegmentPushType/Frequency() when BatchIngestionConfig is
absent (IngestionConfigUtils.java:204,224). Turning the builder setters into
silent no-ops while that fallback exists is a silent behavioral break: callers
that pass REFRESH get APPEND with no error.

Restore the private fields, setter logic, and validationConfig write-through
so existing callers continue to get the table config they asked for.

The methods remain @deprecated pointing to IngestionConfig. Actual removal
requires a coordinated change that also removes the IngestionConfigUtils
legacy fallback.
@Akanksha-kedia
Copy link
Copy Markdown
Contributor Author

@xiangfu0 please help to review

@Akanksha-kedia Akanksha-kedia force-pushed the fix-remove-deprecated-segment-push-fields branch from 89e9c26 to 469afbc Compare May 14, 2026 12:20
@Jackie-Jiang Jackie-Jiang added cleanup Code cleanup or removal of dead code deprecation Marks deprecated APIs, configs, or features labels May 14, 2026
Copy link
Copy Markdown
Contributor

@Jackie-Jiang Jackie-Jiang left a comment

Choose a reason for hiding this comment

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

This is not the correct fix. These 2 fields are moved into BatchIngestionConfig. We need to set the correct property instead

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

Labels

cleanup Code cleanup or removal of dead code deprecation Marks deprecated APIs, configs, or features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants