Jackie-Jiang commented on code in PR #19998:
URL: https://github.com/apache/pinot/pull/19998#discussion_r4429938260


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/immutable/ImmutableSegmentLoader.java:
##########
@@ -154,7 +163,9 @@ public static ImmutableSegment load(File indexDir, 
IndexLoadingConfig indexLoadi
     }
     SegmentDirectoryLoader segmentLoader =
         
SegmentDirectoryLoaderRegistry.getSegmentDirectoryLoader(indexLoadingConfig.getSegmentDirectoryLoader());
-    SegmentDirectory segmentDirectory = segmentLoader.load(indexDir.toURI(), 
segmentLoaderContext);
+    SegmentDirectory segmentDirectory = segmentLoader.load(indexDir.toURI(),
+        indexLoadingConfig.isMappedSegmentMetadataEnabled()
+            ? segmentLoaderContext.withMappedMetadataEnabled() : 
segmentLoaderContext);

Review Comment:
   [P3] Extend snapshot reuse to existing-segment startup/reload
   
   This marks only the File-based load. 
BaseTableDataManager.initSegmentDirectory() still builds an unmarked context, 
and both tryLoadExistingSegmentWithoutRegistering() and the directory-reuse 
reload path subsequently call load(SegmentDirectory, ...). When a sidecar is 
missing or stale, those paths first parse eager metadata while opening the 
directory and then parse it again in MappedSegmentMetadataStore.build(). Please 
propagate snapshot capture to those paths, preserving the post-preprocessing 
freshness checks, and add a test that demonstrates successful reuse through the 
normal server path. This is a nonblocking gap in the optimization, not a 
correctness regression.



-- 
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