Cherry-picked from #48134 Co-authored-by: walter <maochuan@selectdb.com>
This commit is contained in:
committed by
GitHub
parent
a3753c7edb
commit
0fe6c17ce2
@ -182,6 +182,10 @@ public class DynamicPartitionProperty {
|
||||
return storagePolicy;
|
||||
}
|
||||
|
||||
public void clearStoragePolicy() {
|
||||
storagePolicy = "";
|
||||
}
|
||||
|
||||
public String getStorageMedium() {
|
||||
return storageMedium;
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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() {
|
||||
|
||||
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user