TangSiyang2001 commented on code in PR #20617:
URL: https://github.com/apache/doris/pull/20617#discussion_r1229646805


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java:
##########
@@ -1815,11 +1816,35 @@ 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) {
+                        return !backend.isAlive();
+                    }
+                }).map(Backend::getHost).collect(Collectors.toList());

Review Comment:
   style recommended.
   
   ```java
   Set<String> downBeSet = countDownLatch.getLeftMarks().stream()
                           .map(item -> infoService.getBackend(item.getKey()))
                           .filter(backend -> !backend.isAlive())
                           .map(Backend::getHost)
                           .collect(Collectors.toSet());
   ```



-- 
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