You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/01/23 00:47:28 UTC
[GitHub] [incubator-doris] morningman commented on a change in pull request #7784: [Bug] Consider backend status when more than one backends exists in same host
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org