wangbo commented on code in PR #48187: URL: https://github.com/apache/doris/pull/48187#discussion_r1966383217
########## 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: 其实这里不确定是否为空,因为之前拿resourcetag的时候也判了下ctx是否为空,为空就不走tag逻辑了,单纯为了代码健壮性 -- 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