Skip to content

Honor skipSegmentPreprocess in ImmutableSegmentLoader#preprocess - #19394

Draft
deepthi912 wants to merge 1 commit into
apache:masterfrom
deepthi912:honor-skip-preprocess-in-load
Draft

Honor skipSegmentPreprocess in ImmutableSegmentLoader#preprocess#19394
deepthi912 wants to merge 1 commit into
apache:masterfrom
deepthi912:honor-skip-preprocess-in-load

Conversation

@deepthi912

@deepthi912 deepthi912 commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

ImmutableSegmentLoader#needPreprocess already short-circuits when skipSegmentPreprocess is set (and after #19391, honors the tier-scoped override too). Callers on the warm-load and reload paths route through needPreprocess, so they observe the flag correctly. But the cold-download path in BaseTableDataManagerdownloadAndLoadSegment and replaceSegmentIfCrcMismatch — invokes the 4-arg ImmutableSegmentLoader#load overload that hard-codes needPreprocess=true and calls preprocess directly. Preprocess itself never consulted the flag, so every index handler (V1→V3 conversion, default columns, inverted, range, StarTree parquet null-vector / page-index build) ran even when the table config asked to skip.

This PR moves the flag check into preprocess itself. Every caller now behaves consistently — whether preprocess is reached through needPreprocess or directly, skipSegmentPreprocess=true results in a uniform no-op.

Changes

  • ImmutableSegmentLoader.preprocess: early-return when indexLoadingConfig.isSkipSegmentPreprocess() is true. Log at INFO so the skip is auditable.

Related

ImmutableSegmentLoader#needPreprocess already short-circuits when the
(possibly tier-scoped) flag is set. Callers on the warm-load and reload
paths route through that helper, so they observe the flag correctly. But
the cold-download path in BaseTableDataManager — downloadAndLoadSegment
and replaceSegmentIfCrcMismatch — invokes the 4-arg
ImmutableSegmentLoader#load, whose overload hard-codes needPreprocess=true
and calls preprocess directly. Preprocess never consulted the flag, so
every index handler (V1→V3 conversion, default columns, inverted, range,
and StarTree parquet null-vector / page-index build) ran even when the
table config asked to skip.

Move the flag check into preprocess itself. Every caller now behaves
consistently: the flag is honored uniformly whether preprocess is reached
through needPreprocess or directly. Regression test builds a V1 segment,
invokes preprocess with skipSegmentPreprocess=true, and asserts that the
V1→V3 conversion (which the ILC would otherwise request) does not run.
@deepthi912
deepthi912 marked this pull request as draft August 29, 2026 01:07
@deepthi912 deepthi912 added the index Related to indexing (general) label Aug 29, 2026
@codecov-commenter

codecov-commenter commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.57%. Comparing base (bd69e76) to head (77385d5).

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #19394      +/-   ##
============================================
- Coverage     67.57%   67.57%   -0.01%     
  Complexity     1430     1430              
============================================
  Files          3486     3486              
  Lines        224134   224138       +4     
  Branches      35376    35377       +1     
============================================
- Hits         151464   151454      -10     
- Misses        60652    60659       +7     
- Partials      12018    12025       +7     
Flag Coverage Δ
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-25 67.57% <100.00%> (-0.01%) ⬇️
lane-a 100.00% <ø> (ø)
lane-b 0.00% <ø> (ø)
temurin 67.57% <100.00%> (-0.01%) ⬇️
unittests 67.56% <100.00%> (-0.01%) ⬇️
unittests1 57.66% <0.00%> (-0.02%) ⬇️
unittests2 39.33% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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

Labels

index Related to indexing (general)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants