This is an automated email from the ASF dual-hosted git repository. dataroaring pushed a commit to branch branch-3.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push: new c3a2069eb76 branch-3.0: [fix](restore) Remove dynamic_partition.storage_policy property #48134 (#48159) c3a2069eb76 is described below commit c3a2069eb76cbddd91d74ecb6dee83857a7ddc40 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Fri Feb 21 08:30:04 2025 +0800 branch-3.0: [fix](restore) Remove dynamic_partition.storage_policy property #48134 (#48159) 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 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 87a59c20145..c6109833326 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 @@ -2187,13 +2187,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 134437f1db9..cdefe46a102 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 373541ea125..c4a8983df6f 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 @@ -2802,7 +2802,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