This is an automated email from the ASF dual-hosted git repository. w41ter pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 6a3e3970c4c [fix](restore) Remove dynamic_partition.storage_policy property (#48134) 6a3e3970c4c is described below commit 6a3e3970c4ca4d416e85c3fdf2946c5fcabe827b Author: walter <maoch...@selectdb.com> AuthorDate: Thu Feb 20 20:35:31 2025 +0800 [fix](restore) Remove dynamic_partition.storage_policy property (#48134) --- .../java/org/apache/doris/catalog/DynamicPartitionProperty.java | 4 ++++ fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java | 6 +++++- .../src/main/java/org/apache/doris/catalog/TableProperty.java | 2 ++ .../src/main/java/org/apache/doris/datasource/InternalCatalog.java | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/DynamicPartitionProperty.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/DynamicPartitionProperty.java index 918b0dc9d55..68233eec74c 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/catalog/DynamicPartitionProperty.java +++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/DynamicPartitionProperty.java @@ -195,6 +195,10 @@ public class DynamicPartitionProperty { return storagePolicy; } + public void clearStoragePolicy() { + storagePolicy = ""; + } + public String getStorageMedium() { return storageMedium; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java index f58acfd8844..a2339919e2c 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java +++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java @@ -2399,13 +2399,17 @@ public class OlapTable extends Table implements MTMVRelatedTableIf, GsonPostProc return hasChanged; } - public void ignoreInvaildPropertiesWhenSynced(Map<String, String> properties) { + public void ignoreInvalidPropertiesWhenSynced(Map<String, String> properties) { // ignore colocate table PropertyAnalyzer.analyzeColocate(properties); // ignore storage policy if (!PropertyAnalyzer.analyzeStoragePolicy(properties).isEmpty()) { properties.remove(PropertyAnalyzer.PROPERTIES_STORAGE_POLICY); } + // ignore dynamic partition storage policy + if (properties.containsKey(DynamicPartitionProperty.STORAGE_POLICY)) { + properties.remove(DynamicPartitionProperty.STORAGE_POLICY); + } } public void checkChangeReplicaAllocation() throws DdlException { diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/TableProperty.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/TableProperty.java index de839af03ca..6ab051168c3 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/catalog/TableProperty.java +++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/TableProperty.java @@ -469,6 +469,8 @@ public class TableProperty implements Writable, GsonPostProcessable { properties.remove(PropertyAnalyzer.PROPERTIES_STORAGE_POLICY); storagePolicy = ""; properties.remove(PropertyAnalyzer.PROPERTIES_COLOCATE_WITH); + properties.remove(DynamicPartitionProperty.STORAGE_POLICY); + dynamicPartitionProperty.clearStoragePolicy(); } public List<String> getCopiedRowStoreColumns() { diff --git a/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java b/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java index 60fbec9630b..4ab0ae2f37f 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java +++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java @@ -2819,7 +2819,7 @@ public class InternalCatalog implements CatalogIf<Database> { olapTable.setIsBeingSynced(isBeingSynced); if (isBeingSynced) { // erase colocate table, storage policy - olapTable.ignoreInvaildPropertiesWhenSynced(properties); + olapTable.ignoreInvalidPropertiesWhenSynced(properties); // remark auto bucket if (isAutoBucket) { olapTable.markAutoBucket(); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org