deepthi912 opened a new pull request, #19394:
URL: https://github.com/apache/pinot/pull/19394

   ## 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 `BaseTableDataManager` — `downloadAndLoadSegment` 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.
   - `LoaderTest.testSkipSegmentPreprocessShortCircuitsPreprocess`: builds a V1 
segment, invokes `preprocess` with `skipSegmentPreprocess=true` on an ILC that 
would otherwise trigger V1→V3 conversion, and asserts the segment stays V1 with 
no V3 directory materialized. Fails without the fix.
   
   ## Test plan
   
   - [x] `./mvnw -pl pinot-segment-local test -Dtest=LoaderTest 
-Dcheckstyle.skip -Dsurefire.failIfNoSpecifiedTests=false` — 11/11 pass.
   - [x] `./mvnw -pl pinot-segment-local checkstyle:check spotless:check` — 
clean.
   
   ## Related
   
   - #19391 (merged) made the flag tier-aware. This PR closes the last runtime 
gap so the flag has effect on every code path — including fresh cold downloads.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to