klsince commented on a change in pull request #7319: URL: https://github.com/apache/pinot/pull/7319#discussion_r704597692
########## File path: pinot-core/src/main/java/org/apache/pinot/core/data/manager/InstanceDataManager.java ########## @@ -86,11 +86,28 @@ void reloadSegment(String tableNameWithType, String segmentName) throws Exception; /** - * Reloads all segment in a table. + * Reloads all segments in a table. */ void reloadAllSegments(String tableNameWithType) throws Exception; + /** + * Adds or replaces a segment in a table. Different from segment reloading, + * 1. this method doesn't assume the existence of TableDataManager object and it + * can actually initialize the TableDataManager for the segment; + * 2. this method can download a new segment to replace the local one before loading. + * Download is conducted when local segment's CRC is different from the one of the + * remote segment, but can also be forced to do regardless of CRC difference. + */ + void addOrReplaceSegment(String tableNameWithType, String segmentName, boolean forceDownload) Review comment: as discussed, I'm adding the forceDownload flag to reload...() APIs, and refactor this addOrReplace...(). -- 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