This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push: new 0fe6c17ce2f branch-2.1: [fix](restore) Remove dynamic_partition.storage_policy property #48134 (#48160) 0fe6c17ce2f is described below commit 0fe6c17ce2fa4f50f957fc2e04d7339521fda045 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Fri Feb 21 17:37:37 2025 +0800 branch-2.1: [fix](restore) Remove dynamic_partition.storage_policy property #48134 (#48160) Cherry-picked from #48134 Co-authored-by: walter <maoch...@selectdb.com> --- .../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 54c49c1ee8d..0fb064b02aa 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 @@ -182,6 +182,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 4416a708670..694a0cecbc9 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 @@ -2214,13 +2214,17 @@ public class OlapTable extends Table implements MTMVRelatedTableIf { 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 2569201167b..9eb0f127149 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 @@ -404,6 +404,8 @@ public class TableProperty implements Writable { properties.remove(PropertyAnalyzer.PROPERTIES_STORAGE_POLICY); storagePolicy = ""; properties.remove(PropertyAnalyzer.PROPERTIES_COLOCATE_WITH); + properties.remove(DynamicPartitionProperty.STORAGE_POLICY); + dynamicPartitionProperty.clearStoragePolicy(); } public TableProperty buildBinlogConfig() { 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 9093b96c236..fe4957a30bd 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 @@ -2599,7 +2599,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