yujun777 commented on code in PR #40771:
URL: https://github.com/apache/doris/pull/40771#discussion_r1776561003


##########
fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudReplica.java:
##########
@@ -93,51 +97,114 @@ private boolean isColocated() {
         return Env.getCurrentColocateIndex().isColocateTable(tableId);
     }
 
-    private long getColocatedBeId(String cluster) throws ComputeGroupException 
{
-        List<Backend> bes = ((CloudSystemInfoService) 
Env.getCurrentSystemInfo()).getBackendsByClusterId(cluster);
-        String clusterName = ((CloudSystemInfoService) 
Env.getCurrentSystemInfo()).getClusterNameByClusterId(cluster);
+    public long getColocatedBeId(String cluster) throws ComputeGroupException {
+        List<Backend> bes = ((CloudSystemInfoService) 
Env.getCurrentSystemInfo())
+                .getBackendsByClusterId(cluster).stream()
+                .filter(be -> 
!be.isQueryDisabled()).collect(Collectors.toList());
         if (bes.isEmpty()) {
+            LOG.warn("failed to get available be, clusterId: {}", cluster);
             throw new ComputeGroupException(
-                String.format("There are no Backend nodes in the current 
compute group %s", clusterName),
+                String.format("There are no Backend nodes in the current 
compute group %s", cluster),

Review Comment:
   had fixed



-- 
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