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


##########
fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java:
##########
@@ -1466,23 +1469,27 @@ public boolean shouldCancel(List<Backend> 
currentBackends) {
     // fragment,
     // if any, as well as all plan fragments on remote nodes.
     public void cancel() {
-        cancel(Types.PPlanFragmentCancelReason.USER_CANCEL);
+        cancel(new Status(TStatusCode.CANCELLED, "query is cancelled by 
user"));
         if (queueToken != null) {
             queueToken.signalForCancel();
         }
     }
 
     @Override
-    public void cancel(Types.PPlanFragmentCancelReason cancelReason) {
+    public void cancel(Status cancelReason) {
         lock();
+        if (cancelReason.ok()) {
+            throw new RuntimeException("Should use correct cancel reason, but 
it is "

Review Comment:
   `lock.unlock` before throw exception



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

Reply via email to