github-actions[bot] commented on code in PR #63696:
URL: https://github.com/apache/doris/pull/63696#discussion_r3308671318
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/TableProperty.java:
##########
@@ -194,6 +195,12 @@ public TableProperty buildProperty(short opCode) {
*/
public TableProperty resetPropertiesForRestore(boolean
reserveDynamicPartitionEnable, boolean reserveReplica,
ReplicaAllocation
replicaAlloc) {
+ if (Config.isCloudMode()) {
+ // In cloud mode, rewrite all properties that are not supported or
need to be forced.
+ // This handles: replication_num, replication_allocation,
dynamic_partition.replication_num,
+ // dynamic_partition.replication_allocation, storage_policy,
storage_medium, in_memory, etc.
+ PropertyAnalyzer.getInstance().rewriteForceProperties(properties);
Review Comment:
After this removes cloud-unsupported keys from `properties`, the derived
fields that were already built from the backup metadata are left unchanged.
`gsonPostProcess()` builds `isInMemory`, `storageMedium`, and `storagePolicy`
before restore reset runs, but `resetPropertiesForRestore()` only rebuilds the
dynamic property and replica allocation. For example, restoring a source table
with `"in_memory" = "true"` in cloud mode removes the key here, while
`TableProperty.isInMemory` remains `true`; later
`InternalCatalog.addPartition()` inherits `olapTable.isInMemory()` into new
partition properties, reintroducing the unsupported source setting even though
the persisted map was sanitized. Please rebuild or explicitly reset the
affected derived fields (`buildInMemory()`, `buildStorageMedium()`,
`buildStoragePolicy()`, and any other field changed by
`rewriteForceProperties`) after the cloud rewrite.
--
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]