From aea74675e2277b588f6530e014ff438034410ac8 Mon Sep 17 00:00:00 2001 From: zhangdong <493738387@qq.com> Date: Tue, 24 Sep 2024 14:35:21 +0800 Subject: [PATCH] [revert](storage) storage medium of partition should not inherit from table (#41192) revert #35644 table if not set storage medium, will set default by `Config.default_storage_medium`, at present, we cannot distinguish whether the storage medium of the table is set by the user. If it is not set by the user, it represents priority use rather than mandatory use. If we directly inherit the storage medium of the table, it may cause the partition to be forced to use 'Config. default_storage_madium', resulting in the partition being unable to be created --- .../java/org/apache/doris/datasource/InternalCatalog.java | 7 ------- .../suites/mtmv_p0/test_storage_medium_mtmv.groovy | 3 +++ 2 files changed, 3 insertions(+), 7 deletions(-) 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 e5131b1dd301a8..51ca2817fc7276 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 @@ -1591,13 +1591,6 @@ public void addPartition(Database db, String tableName, AddPartitionClause addPa if (!properties.containsKey(PropertyAnalyzer.PROPERTIES_STORAGE_POLICY)) { properties.put(PropertyAnalyzer.PROPERTIES_STORAGE_POLICY, olapTable.getStoragePolicy()); } - if (!properties.containsKey(PropertyAnalyzer.PROPERTIES_STORAGE_MEDIUM)) { - TStorageMedium tableStorageMedium = olapTable.getStorageMedium(); - if (tableStorageMedium != null) { - properties.put(PropertyAnalyzer.PROPERTIES_STORAGE_MEDIUM, - tableStorageMedium.name().toLowerCase()); - } - } singlePartitionDesc.analyze(partitionInfo.getPartitionColumns().size(), properties); partitionInfo.createAndCheckPartitionItem(singlePartitionDesc, isTempPartition); diff --git a/regression-test/suites/mtmv_p0/test_storage_medium_mtmv.groovy b/regression-test/suites/mtmv_p0/test_storage_medium_mtmv.groovy index 947ee72b08d302..efaff9aff5dc79 100644 --- a/regression-test/suites/mtmv_p0/test_storage_medium_mtmv.groovy +++ b/regression-test/suites/mtmv_p0/test_storage_medium_mtmv.groovy @@ -18,6 +18,9 @@ import org.junit.Assert; suite("test_storage_medium_mtmv","mtmv") { + + // current, can not support extend storage medium from table + return; String suiteName = "test_storage_medium_mtmv" String tableName = "${suiteName}_table" String mvName = "${suiteName}_mv"