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


##########
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:
   I don't fully follow. When CRC mismatch, we should always download a new 
copy from the deep store right?



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