TangSiyang2001 commented on code in PR #20617: URL: https://github.com/apache/doris/pull/20617#discussion_r1227785595
########## fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java: ########## @@ -1815,7 +1817,34 @@ private Partition createPartitionWithIndices(String clusterName, long dbId, long } if (!ok || !countDownLatch.getStatus().ok()) { - errMsg = "Failed to create partition[" + partitionName + "]. Timeout:" + (timeout / 1000) + " seconds."; + SystemInfoService infoService = Env.getCurrentSystemInfo(); + List<String> allBEHost = countDownLatch.getLeftMarks().stream().map(item -> { + return infoService.getBackend(item.getKey()).getHost(); + }).distinct().collect(Collectors.toList()); + List<String> downBEList = countDownLatch.getLeftMarks().stream().map(item -> { + return infoService.getBackend(item.getKey()); + }).distinct().filter(new Predicate<Backend>() { + @Override + public boolean test(Backend backend) { + String ip = "http://" + backend.getHost() + ":" + backend.getBePort() + "/api/health"; + try { + HttpUtils.doGet(ip, null); + } catch (Exception e) { + return true; + } + return false; + } Review Comment: Maybe we could make use of https://github.com/apache/doris/blob/2dddab03a1a0c73325159c31f5c23653ad63f69c/fe/fe-core/src/main/java/org/apache/doris/system/SystemInfoService.java#L368-L383 to check alive BE and no need to ping here. ########## fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java: ########## @@ -1815,7 +1817,34 @@ private Partition createPartitionWithIndices(String clusterName, long dbId, long } if (!ok || !countDownLatch.getStatus().ok()) { - errMsg = "Failed to create partition[" + partitionName + "]. Timeout:" + (timeout / 1000) + " seconds."; Review Comment: Moreover, I think we could treat `!ok` as timeout, and `!countDownLatch.getStatus().ok()` as BE down. -- 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