deepthi912 commented on code in PR #13789:
URL: https://github.com/apache/pinot/pull/13789#discussion_r1719454222


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/BaseTableDataManager.java:
##########
@@ -1013,6 +1013,22 @@ public boolean tryLoadExistingSegment(SegmentZKMetadata 
zkMetadata, IndexLoading
     }
   }
 
+  boolean needReloadSegment(SegmentZKMetadata zkMetadata, IndexLoadingConfig 
indexLoadingConfig)
+      throws Exception {
+    String segmentName = zkMetadata.getSegmentName();
+    SegmentDirectory segmentDirectory =
+        tryInitSegmentDirectory(segmentName, 
String.valueOf(zkMetadata.getCrc()), indexLoadingConfig);
+    try {
+      Schema schema = indexLoadingConfig.getSchema();
+      //if re processing or reload is needed on a segment then return true
+      return ImmutableSegmentLoader.needPreprocess(segmentDirectory, 
indexLoadingConfig, schema);
+    } catch (Exception e) {

Review Comment:
    closeSegmentDirectoryQuietly(segmentDirectory); There is this closure being 
handled in exception cases( so wrote a catch block). Do you want me to handle 
this in finally?



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