J-HowHuang opened a new pull request, #20367: URL: https://github.com/apache/pinot/pull/20367
## Description In segment reload, we first check `canReuseExistingDirectoryForReload(zkMetadata, segmentTier, segmentDirectory, indexLoadingConfig)` where `segmentDirectory` is a segment directory opened on the same path of the loaded one by `initSegmentDirectory(segmentName, zkMetadata.getCrc(), indexLoadingConfig, zkMetadata);`, which is set the current tier in `indexLoadingConfig`. If current is not reusable (e.g. tier changed, need preprocess), the directory will be copied and the same thread would go preprocess on the directory. This assumes that the reusable directory can only be the current one, and will have to rebuild otherwise. This PR change that assumption. It allows loading a segment with any segment directory that one finds reusable, by changing the structure to have a overridable method `getReusableDirectoryForReload` to return any segment directory that is considered to be usable given the segment, and doesn't need to go through the rebuild process. -- 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]
