zhiqiang-hhhh commented on code in PR #23863: URL: https://github.com/apache/doris/pull/23863#discussion_r1317140248
########## 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: 嗯,这里可以删掉,只用 BackendExecStates 跟 PipelineExecContext 也是可以的 ########## 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: 嗯,这里可以删掉,只用 BackendExecStates 跟 PipelineExecContext 也是可以的 -- 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