This is an automated email from the ASF dual-hosted git repository. cambyzju pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push: new a3d185479b9 [fix](replication_allocation) fix two problems for force_olap_table_replication_allocation #34554 (#34659) a3d185479b9 is described below commit a3d185479b9262bf11a907373608518c5aeddb64 Author: camby <camby...@tencent.com> AuthorDate: Mon May 13 10:57:57 2024 +0800 [fix](replication_allocation) fix two problems for force_olap_table_replication_allocation #34554 (#34659) --- .../main/java/org/apache/doris/common/util/DynamicPartitionUtil.java | 3 ++- .../main/java/org/apache/doris/mysql/privilege/UserPropertyMgr.java | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/util/DynamicPartitionUtil.java b/fe/fe-core/src/main/java/org/apache/doris/common/util/DynamicPartitionUtil.java index ca3086c6ede..e26d0cbd9f2 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/common/util/DynamicPartitionUtil.java +++ b/fe/fe-core/src/main/java/org/apache/doris/common/util/DynamicPartitionUtil.java @@ -630,7 +630,8 @@ public class DynamicPartitionUtil { // check replication_allocation first, then replciation_num ReplicaAllocation replicaAlloc = null; - if (properties.containsKey(DynamicPartitionProperty.REPLICATION_ALLOCATION)) { + if (!Config.force_olap_table_replication_allocation.isEmpty() + || properties.containsKey(DynamicPartitionProperty.REPLICATION_ALLOCATION)) { replicaAlloc = PropertyAnalyzer.analyzeReplicaAllocation(properties, "dynamic_partition"); properties.remove(DynamicPartitionProperty.REPLICATION_ALLOCATION); analyzedProperties.put(DynamicPartitionProperty.REPLICATION_ALLOCATION, replicaAlloc.toCreateStmt()); diff --git a/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserPropertyMgr.java b/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserPropertyMgr.java index 8f634bccbe3..4fb873d404d 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserPropertyMgr.java +++ b/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserPropertyMgr.java @@ -137,9 +137,10 @@ public class UserPropertyMgr implements Writable { Set<Tag> tags = existProperty.getCopiedResourceTags(); // only root and admin can return empty tag. // empty tag means user can access all backends. - // for normal user, if tag is empty, use default tag. + // for normal user, if tag is empty and not set force_olap_table_replication_allocation, use default tag. if (tags.isEmpty() && !(qualifiedUser.equalsIgnoreCase(Auth.ROOT_USER) - || qualifiedUser.equalsIgnoreCase(Auth.ADMIN_USER))) { + || qualifiedUser.equalsIgnoreCase(Auth.ADMIN_USER)) + && Config.force_olap_table_replication_allocation.isEmpty()) { tags = Sets.newHashSet(Tag.DEFAULT_BACKEND_TAG); } return tags; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org