This is an automated email from the ASF dual-hosted git repository.
gavinchou 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 0dc186eb767 [Fix](cloud) Optimize the prompt information if no cloud
cluster (privilege) (#37305)
0dc186eb767 is described below
commit 0dc186eb767927f9303b8f0c09b16f7d51e135d1
Author: deardeng <[email protected]>
AuthorDate: Sat Jul 6 00:28:28 2024 +0800
[Fix](cloud) Optimize the prompt information if no cloud cluster
(privilege) (#37305)
---
.../src/main/java/org/apache/doris/cloud/qe/CloudCoordinator.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/cloud/qe/CloudCoordinator.java
b/fe/fe-core/src/main/java/org/apache/doris/cloud/qe/CloudCoordinator.java
index b3e0073aa10..2a69e84352d 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/cloud/qe/CloudCoordinator.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/cloud/qe/CloudCoordinator.java
@@ -62,7 +62,7 @@ public class CloudCoordinator extends Coordinator {
((CloudEnv)
Env.getCurrentEnv()).checkCloudClusterPriv(cluster);
} catch (Exception e) {
LOG.warn("get cluster by session context exception", e);
- return;
+ throw new UserException("get cluster by session context
exception", e);
}
LOG.debug("get cluster by session context cluster: {}",
cluster);
} else {
@@ -71,12 +71,13 @@ public class CloudCoordinator extends Coordinator {
}
} else {
LOG.warn("connect context is null in coordinator prepare");
+ // may cant throw exception? maybe cant get context in some
scenarios
return;
}
if (Strings.isNullOrEmpty(cluster)) {
LOG.warn("invalid clusterName: {}", cluster);
- return;
+ throw new UserException("empty clusterName, please check cloud
cluster privilege");
}
this.idToBackend = ((CloudSystemInfoService)
Env.getCurrentSystemInfo()).getCloudIdToBackend(cluster);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]