github-actions[bot] commented on code in PR #62704:
URL: https://github.com/apache/doris/pull/62704#discussion_r3122916053
##########
fe/fe-core/src/main/java/org/apache/doris/cloud/backup/CloudRestoreJob.java:
##########
@@ -157,6 +159,36 @@ public synchronized void run() {
}
}
+ @Override
+ protected void updateOlapTablesVersion(Database db, boolean isReplay) {
+ super.updateOlapTablesVersion(db, isReplay);
+ if (isReplay) {
+ return;
+ }
+ for (String tableName : jobInfo.backupOlapTableObjects.keySet()) {
+ Table tbl =
db.getTableNullable(jobInfo.getAliasByOriginNameIfSet(tableName));
+ if (tbl == null || tbl.getType() != TableType.OLAP) {
+ continue;
+ }
+ OlapTable olapTable = (OlapTable) tbl;
+
+ // sync version
+ List<Pair<OlapTable, Long>> tableVersionMap = Lists.newArrayList(
+ Pair.of(olapTable, olapTable.getCachedTableVersion()));
+ Map<CloudPartition, Pair<Long, Long>> partitionVersionMap = new
HashMap<>(olapTable.getPartitions().size());
+ for (Partition partition : olapTable.getPartitions()) {
+ CloudPartition cloudPartition = (CloudPartition) partition;
+ long version = cloudPartition.getCachedVisibleVersion();
+ partitionVersionMap.put(cloudPartition, Pair.of(version,
partition.getVisibleVersionTime()));
+ }
+ ((CloudEnv) env).getCloudFEVersionSynchronizer()
+ .pushVersionAsync(dbId, tableVersionMap,
partitionVersionMap);
+
Review Comment:
This refresh is scoped to the whole table, not the restored tablets. On a
partition-scoped restore into a large existing table, will enqueue stats
collection for every tablet in the table even though only the restored
partition changed. Other cloud paths (, , ) only push the affected tablets.
Please limit this to tablets from the restored partitions / restored tables to
avoid a full-table stats burst.
##########
fe/fe-core/src/main/java/org/apache/doris/cloud/backup/CloudRestoreJob.java:
##########
@@ -459,6 +491,13 @@ private void handleOlapTableMeta(MetaSeriviceOperation
operation, OlapTable olap
partitions.forEach(partition -> {
Review Comment:
has already been captured from on the previous line, so this extra call
does not contribute to what persists. For restored s, starts at after
deserialization/copy, so immediately issues a RPC against the fresh partition
id before runs. That adds a new restore failure point even though already has
its own retry loop. Could we seed the local cache from the already known
restore version instead of doing a live RPC here?
--
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]