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 2020/05/10 10:52:01 UTC
[GitHub] [incubator-doris] WingsGo commented on a change in pull request #3519: Check backend disk has available capactiy by storage medium before create table
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org