yiguolei commented on code in PR #48187:
URL: https://github.com/apache/doris/pull/48187#discussion_r1965721272


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/FederationBackendPolicy.java:
##########
@@ -184,11 +163,25 @@ public void init(List<String> preLocations) throws 
UserException {
     }
 
     public void init(BeSelectionPolicy policy) throws UserException {
-        backends.addAll(policy.getCandidateBackends(Env.getCurrentSystemInfo()
-                .getBackendsByCurrentCluster().values().asList()));
+        ConnectContext ctx = ConnectContext.get();
+        List<Backend> backendList = null;
+        if (Config.isCloudMode()) {
+            if (ctx == null) {
+                throw new AnalysisException("ConnectContext is null");
+            }
+            backendList = 
Env.getCurrentEnv().getComputeGroupMgr().getComputeGroup(ctx.getComputeGroup())
+                    .getBackendList();
+        } else {
+            ctx = new ConnectContext();

Review Comment:
   为什么非存算分离,这里thread local 可能为空?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to