klsince commented on code in PR #14957:
URL: https://github.com/apache/pinot/pull/14957#discussion_r1936459425


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/BaseTableDataManager.java:
##########
@@ -396,6 +396,18 @@ protected void 
replaceSegmentIfCrcMismatch(SegmentDataManager segmentDataManager
       _logger.info("Segment: {} has CRC: {} same as before, not replacing it", 
segmentName, localMetadata.getCrc());
       return;
     }
+    Schema schema = indexLoadingConfig.getSchema();
+    String segmentTier = zkMetadata.getTier();
+    SegmentDirectory segmentDirectory =
+        initSegmentDirectory(segmentName, String.valueOf(zkMetadata.getCrc()), 
indexLoadingConfig);
+    // We should first try to reuse existing segment directory
+    if (isDirectoryReusable(zkMetadata, segmentTier, segmentDirectory, 
indexLoadingConfig, schema)) {

Review Comment:
   @deepthi912 I think we can try to override downloadAndLoadSegment() to do 
the extra checks before downloading raw segments from deep store or move those 
inside interface, as those extra steps (particularly initializing 
SegmentDirectory object) don't apply to servers managing segments on local disk.
   
   



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to