klsince commented on code in PR #10089:
URL: https://github.com/apache/pinot/pull/10089#discussion_r1082833141
##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/BaseTableDataManager.java:
##########
@@ -403,6 +417,16 @@ public void reloadSegment(String segmentName,
IndexLoadingConfig indexLoadingCon
}
}
+ public boolean canReuseExistingDirectoryForReload(SegmentZKMetadata
segmentZKMetadata,
+ String currentSegmentTier, SegmentDirectory segmentDirectory,
IndexLoadingConfig indexLoadingConfig,
+ Schema schema)
+ throws Exception {
+ SegmentDirectoryLoader segmentDirectoryLoader =
+
SegmentDirectoryLoaderRegistry.getSegmentDirectoryLoader(indexLoadingConfig.getSegmentDirectoryLoader());
+ return
!segmentDirectoryLoader.needsTierMigration(segmentZKMetadata.getTier(),
currentSegmentTier)
+ && !ImmutableSegmentLoader.needPreprocess(segmentDirectory,
indexLoadingConfig, schema);
Review Comment:
yes, it also depends on if the segdir loader can migrate tier or not, and it
seems more reasonable to have loader to check this, e.g. both
TierBasedSegmentDirectoryLoader and DefaultSegmentDirectoryLoader returns
SegmentLocalFSDirectory and only the former needs to do tier migration.
--
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]