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 bc5c8c2e0bf [fix](cloud) fix chose cloud cluster order (#32506)
bc5c8c2e0bf is described below
commit bc5c8c2e0bf3a1b2cb74bc093f6167949395b426
Author: yujun <[email protected]>
AuthorDate: Fri Mar 22 12:19:55 2024 +0800
[fix](cloud) fix chose cloud cluster order (#32506)
* fix use cluster not work
* update
---
.../java/org/apache/doris/qe/ConnectContext.java | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java
b/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java
index 33e5ff72d91..a20e40cdc67 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java
@@ -1085,18 +1085,25 @@ public class ConnectContext {
}
String cluster = null;
+ String choseWay = null;
if (!Strings.isNullOrEmpty(this.cloudCluster)) {
cluster = this.cloudCluster;
+ choseWay = "use @cluster";
+ LOG.debug("finally set context cluster name {} for user {} with
chose way '{}'",
+ cloudCluster, getCurrentUserIdentity(), choseWay);
+ return cluster;
}
String defaultCluster = getDefaultCloudCluster();
if (!Strings.isNullOrEmpty(defaultCluster)) {
cluster = defaultCluster;
- }
-
- String authorizedCluster = getAuthorizedCloudCluster();
- if (!Strings.isNullOrEmpty(authorizedCluster)) {
- cluster = authorizedCluster;
+ choseWay = "default cluster";
+ } else {
+ String authorizedCluster = getAuthorizedCloudCluster();
+ if (!Strings.isNullOrEmpty(authorizedCluster)) {
+ cluster = authorizedCluster;
+ choseWay = "authorized cluster";
+ }
}
if (Strings.isNullOrEmpty(cluster)) {
@@ -1107,7 +1114,8 @@ public class ConnectContext {
}
} else {
this.cloudCluster = cluster;
- LOG.info("finally set context cluster name {} for user {}",
cloudCluster, getCurrentUserIdentity());
+ LOG.info("finally set context cluster name {} for user {} with
chose way '{}'",
+ cloudCluster, getCurrentUserIdentity(), choseWay);
}
return cluster;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]