This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 0b5ab1b536e [fix](replication_allocation) fix two problems for
force_olap_table_replication_allocation #34554
0b5ab1b536e is described below
commit 0b5ab1b536e5e8cea9847ab00261d01c805048b4
Author: camby <[email protected]>
AuthorDate: Fri May 10 13:46:48 2024 +0800
[fix](replication_allocation) fix two problems for
force_olap_table_replication_allocation #34554
---
.../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 4464473788f..fe29dfe7eea 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
@@ -636,7 +636,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 1160341df1c..816ce769a31 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
@@ -169,9 +169,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: [email protected]
For additional commands, e-mail: [email protected]