yiguolei commented on code in PR #23863:
URL: https://github.com/apache/doris/pull/23863#discussion_r1317115158


##########
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();
+
+        for (Long id : idToBackend.keySet()) {

Review Comment:
   这里为什么要判断这个idToBackend, 按道理说直接BackendExecStates 就行了吧?



##########
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();
+
+        for (Long id : idToBackend.keySet()) {

Review Comment:
   这里为什么要判断这个idToBackend, 按道理说直接BackendExecStates 就行了吧?



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