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


##########
be/src/runtime/fragment_mgr.cpp:
##########
@@ -765,9 +765,16 @@ Status FragmentMgr::_get_or_create_query_ctx(const 
TPipelineFragmentParams& para
 
                         // This may be a first fragment request of the query.
                         // Create the query fragments context.
-                        query_ctx = QueryContext::create(query_id, _exec_env, 
params.query_options,
-                                                         params.coord, 
params.is_nereids,
-                                                         
params.current_connect_fe, query_source);
+                        // Cross-cluster query: coordinator FE may not belong 
to local cluster.
+                        // In that case, cancel_worker() should not cancel it 
based on local FE liveness.
+                        QuerySource actual_query_source = query_source;
+                        if (query_source == QuerySource::INTERNAL_FRONTEND &&
+                            
!_exec_env->get_running_frontends().contains(params.coord)) {
+                            actual_query_source = 
QuerySource::EXTERNAL_FRONTEND;

Review Comment:
   why not set the query source during send fragment in FE??



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