morningman commented on a change in pull request #7784:
URL: https://github.com/apache/incubator-doris/pull/7784#discussion_r790200118



##########
File path: 
fe/fe-core/src/main/java/org/apache/doris/system/SystemInfoService.java
##########
@@ -871,6 +871,9 @@ public void releaseBackends(String clusterName, boolean 
isReplay) {
         List<Backend> backends = Lists.newArrayList();
         for (List<Backend> list : backendMaps.values()) {
             if (FeConstants.runningUnitTest || 
Config.allow_replica_on_same_host) {
+                if (needAlive) {

Review comment:
       This block:
   ```
   if (needAlive) {
       list = 
list.stream().filter(Backend::isAlive).collect(Collectors.toList());
   }
   ```
   
   should be added to the following `else` clause:
   
   ```
   } else {
       if (needAlive) {
           list = 
list.stream().filter(Backend::isAlive).collect(Collectors.toList());
       }
       Collections.shuffle(list);
       backends.add(list.get(0));
   }
   ```




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to