zhiqiang-hhhh commented on code in PR #23863:
URL: https://github.com/apache/doris/pull/23863#discussion_r1316859355


##########
fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java:
##########
@@ -1252,6 +1253,92 @@ public RowBatch getNext() throws Exception {
         return resultBatch;
     }
 
+
+    // We use a very conservative cancel strategy.
+    // 0. If backends has zero process epoch, do not cancel. Zero process 
epoch usually arises in cluster upgrading.
+    // 1. If process epoch is same, do not cancel. Means backends does not 
restart or die.
+    public boolean shouldCancel(List<Backend> currentBackends) {
+        Map<Long, Backend> curBeMap = Maps.newHashMap();
+        for (Backend be : currentBackends) {
+            curBeMap.put(be.getId(), be);
+        }
+        lock();

Review Comment:
   but here we do not have potential thrown exception? can we use try {lock()} 
finally {unlock();} either?



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