WingsGo commented on a change in pull request #3519:
URL: https://github.com/apache/incubator-doris/pull/3519#discussion_r422626757
##########
File path: fe/src/main/java/org/apache/doris/system/SystemInfoService.java
##########
@@ -729,8 +639,18 @@ public void releaseBackends(String clusterName, boolean
isReplay) {
// return null if not enough backend
// use synchronized to run serially
public synchronized List<Long> seqChooseBackendIds(int backendNum, boolean
needAlive, boolean isCreate,
- String clusterName) {
- long lastBackendId = -1L;
+ String clusterName) {
+ return seqChooseBackendIds(backendNum, needAlive, isCreate,
clusterName, getClusterBackends(clusterName));
+ }
+ public synchronized List<Long> seqChooseBackendIdsByStorageMedium(int
backendNum, boolean needAlive, boolean isCreate,
+ String
clusterName, TStorageMedium storageMedium) {
+ final List<Backend> backends =
getClusterBackends(clusterName).stream().filter(v ->
!v.checkDiskExceedLimitByStorageMedium(storageMedium)).collect(Collectors.toList());
Review comment:
actually, I change the detail msg to `throw new DdlException("Failed to
find enough host in all backends with storage medium is " + storageMedium + ".
need: " + replicationNum`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]