github-actions[bot] commented on code in PR #63696:
URL: https://github.com/apache/doris/pull/63696#discussion_r3304163529
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/TableProperty.java:
##########
@@ -199,11 +200,23 @@ public TableProperty resetPropertiesForRestore(boolean
reserveDynamicPartitionEn
if (!reserveDynamicPartitionEnable) {
properties.put(DynamicPartitionProperty.ENABLE, "false");
}
- executeBuildDynamicProperty();
}
if (!reserveReplica) {
setReplicaAlloc(replicaAlloc);
}
+ if (Config.isCloudMode()) {
+ // In cloud mode, remove all unsupported dynamic partition
properties from the source
+ // cluster. These properties (e.g., replication_num,
replication_allocation, storage_policy)
+ // are not applicable in cloud mode. If kept, they would cause
dynamic partition scheduler
+ // to create new partitions with incorrect settings, leading to
write failures like:
+ // "alive replica num < 1 load required replica num 2".
+ properties.remove(DynamicPartitionProperty.REPLICATION_NUM);
+ properties.remove(DynamicPartitionProperty.REPLICATION_ALLOCATION);
+ properties.remove(DynamicPartitionProperty.STORAGE_POLICY);
+ executeBuildDynamicProperty();
+ } else if (properties.containsKey(DynamicPartitionProperty.ENABLE)) {
Review Comment:
This cloud restore cleanup is still incomplete. `CloudPropertyAnalyzer` also
deletes `DynamicPartitionProperty.STORAGE_MEDIUM` for normal cloud DDL, but a
restored table that was backed up with `dynamic_partition.storage_medium` keeps
that key here. After `executeBuildDynamicProperty()`,
`DynamicPartitionScheduler.setStorageMediumProperty()` will continue copying it
into each generated partition as `storage_medium`/`storage_cooldown_time`, so
restored dynamic partitions can still be created with source-cluster
storage-medium settings instead of cloud defaults. Please remove
`DynamicPartitionProperty.STORAGE_MEDIUM` here as well and add a cloud-mode
restore test that covers all unsupported dynamic partition properties.
--
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]