github-actions[bot] commented on code in PR #63696:
URL: https://github.com/apache/doris/pull/63696#discussion_r3308460821
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/PartitionInfo.java:
##########
@@ -427,15 +428,33 @@ public void resetPartitionIdForRestore(
idToStoragePolicy = Maps.newHashMap();
for (Map.Entry<Long, Long> entry : partitionIdMap.entrySet()) {
- idToDataProperty.put(entry.getKey(),
origIdToDataProperty.get(entry.getValue()));
- idToReplicaAllocation.put(entry.getKey(),
- restoreReplicaAlloc == null ?
origIdToReplicaAllocation.get(entry.getValue())
+ long newPartId = entry.getKey();
+ long origPartId = entry.getValue();
+
+ if (Config.isCloudMode()) {
+ // In cloud mode, storage_medium, cooldown_time, and
storage_policy are not applicable.
+ // Reset DataProperty to default and clear storage policy to
avoid carrying over
+ // source cluster's storage settings that have no meaning in
cloud mode.
+ DataProperty origDataProperty =
origIdToDataProperty.get(origPartId);
+ idToDataProperty.put(newPartId, new DataProperty(
Review Comment:
This only sanitizes partition-level storage metadata for the full-table
restore path that calls `resetPartitionIdForRestore()`. Restoring selected
partitions into an existing range/list table does not go through this method:
`RestoreJob` calls `resetPartitionForRestore()` and later persists the
partition with `localPartitionInfo.addPartition(..., remoteDataProperty, ...,
remotePartitionInfo.getIsInMemory(...), ...)` at the commit/replay paths. In
cloud mode that still copies the source partition's `DataProperty`
(storage_medium, cooldown_time, storage_policy) and in-memory flag into the
destination table, so a partition-only restore can leave exactly the
unsupported source-cluster settings this PR is trying to remove. Please apply
the same cloud-mode normalization to the partition-restore add path as well, or
centralize the normalization so both full-table and partition restore use it.
--
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]