gavinchou commented on code in PR #36309: URL: https://github.com/apache/doris/pull/36309#discussion_r1639423507
########## fe/fe-core/src/main/java/org/apache/doris/backup/RestoreJob.java: ########## @@ -1781,13 +1781,14 @@ private Status allTabletCommitted(boolean isReplay) { // update partition visible version part.updateVersionForRestore(entry.getValue()); + long visibleVersion = part.getVisibleVersion(); Review Comment: We need to use `org.apache.doris.cloud.catalog.CloudPartition#getSnapshotVisibleVersion(java.util.List<org.apache.doris.cloud.catalog.CloudPartition>)` to get versions in batch for efficiency Make an in-memory temporary version-cache will do ########## fe/fe-core/src/main/java/org/apache/doris/planner/OlapTableSink.java: ########## @@ -625,6 +625,7 @@ public List<TOlapTableLocationParam> createLocation(OlapTable table) throws User Multimap<Long, Long> allBePathsMap = HashMultimap.create(); for (Long partitionId : partitionIds) { Partition partition = table.getPartition(partitionId); + long visibleVersion = partition.getVisibleVersion(); Review Comment: ditto, make it in batch -- 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...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org