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


##########
be/src/service/internal_service.cpp:
##########
@@ -558,15 +558,19 @@ void 
PInternalServiceImpl::cancel_plan_fragment(google::protobuf::RpcController*
         tid.__set_lo(request->finst_id().lo());
         signal::set_signal_task_id(tid);
         Status st = Status::OK();
-        if (request->has_cancel_reason()) {
-            LOG(INFO) << "cancel fragment, fragment_instance_id=" << 
print_id(tid)
-                      << ", reason: " << 
PPlanFragmentCancelReason_Name(request->cancel_reason());
-            _exec_env->fragment_mgr()->cancel_instance(tid, 
request->cancel_reason());
-        } else {
-            LOG(INFO) << "cancel fragment, fragment_instance_id=" << 
print_id(tid);
-            _exec_env->fragment_mgr()->cancel_instance(tid,
-                                                       
PPlanFragmentCancelReason::INTERNAL_ERROR);
-        }
+
+        const bool is_pipeline_fragment = 
_exec_env->fragment_mgr()->is_pipeline_fragment(tid);
+        const bool has_cancel_reason = request->has_cancel_reason();
+        LOG(INFO) << fmt::format("Cancel {}instance {}, reason: {}",
+                                 is_pipeline_fragment ? "pipeline " : "", 
print_id(tid),
+                                 has_cancel_reason
+                                         ? 
PPlanFragmentCancelReason_Name(request->cancel_reason())
+                                         : "INTERNAL_ERROR");
+
+        _exec_env->fragment_mgr()->cancel_instance(

Review Comment:
   rename cancel_instance to  cancel_fragment_instance



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