Gabriel39 commented on code in PR #67053:
URL: https://github.com/apache/doris/pull/67053#discussion_r3841205761


##########
be/src/runtime/fragment_mgr.cpp:
##########
@@ -523,6 +523,7 @@ Status FragmentMgr::_get_or_create_query_ctx(const 
TPipelineFragmentParams& para
                         query_ctx = QueryContext::create(
                                 query_id, _exec_env, params.query_options, 
params.coord,
                                 params.is_nereids, params.current_connect_fe, 
actual_query_source);
+                        
query_ctx->set_fragment_num_on_host(params.fragment_num_on_host);

Review Comment:
   Fixed in a23e930e63. TaskController now advances completion by the number of 
local instances grouped in the closing pipeline fragment context, so two 
local_params advance the FE-provided instance total by two. FragmentMgr also 
derives a missing or non-positive total from the grouped request (and rejects a 
genuinely empty request). The BE regression test covers a 2+1 grouped 
completion sequence.



##########
be/src/exec/pipeline/pipeline_fragment_context.cpp:
##########
@@ -2604,18 +2619,23 @@ void 
PipelineFragmentContext::_coordinator_callback(const ReportStatusRequest& r
         LOG_INFO("Going to cancel query {} since report exec status got rpc 
failed: {}",
                  print_id(req.query_id), rpc_status.to_string());

Review Comment:
   Fixed in a23e930e63. Each ResourceContext now carries a BE-local generation 
and a monotonic snapshot sequence in optional Thrift fields. FE atomically 
compares generation and sequence before replacement, while retaining a 
terminal-state guard for legacy BEs. Regression tests cover delayed S0 after 
final S1 and a newer generation reusing the same query ID.



##########
be/src/exec/pipeline/pipeline_fragment_context.cpp:
##########
@@ -2532,6 +2542,11 @@ void 
PipelineFragmentContext::_coordinator_callback(const ReportStatusRequest& r
     if (_exec_env->cluster_info()->backend_id != 0) {
         params.__set_backend_id(_exec_env->cluster_info()->backend_id);

Review Comment:
   Fixed in a23e930e63. Final statistics are now sent in a separate report to 
ResourceContext.task_controller().fe_addr(), which is current_connect_fe, 
rather than req.coord_addr. The ResourceContext is unregistered only after that 
FE acknowledges the statistics report. The BE builder test uses a distinct 
audit FE address and verifies the selected destination.



##########
be/src/exec/pipeline/pipeline_fragment_context.cpp:
##########
@@ -2532,6 +2542,11 @@ void 
PipelineFragmentContext::_coordinator_callback(const ReportStatusRequest& r
     if (_exec_env->cluster_info()->backend_id != 0) {

Review Comment:
   Fixed in a23e930e63. The BE entry is now initialized with computeIfAbsent, 
and each query entry is updated atomically with ConcurrentMap.compute. A 
barrier-based regression test starts 32 first reports for different queries on 
the same BE and verifies that all entries survive.



##########
be/src/exec/pipeline/pipeline_fragment_context.cpp:
##########
@@ -2532,6 +2542,11 @@ void 
PipelineFragmentContext::_coordinator_callback(const ReportStatusRequest& r
     if (_exec_env->cluster_info()->backend_id != 0) {
         params.__set_backend_id(_exec_env->cluster_info()->backend_id);
     }
+    if (req.report_query_statistics) {

Review Comment:
   Fixed in a23e930e63. Query statistics are no longer appended to the 
coordinator's terminal status payload. The essential terminal payload is 
validated independently, then statistics are sent through a separate RPC. A 
boundary regression test demonstrates that the essential payload fits at its 
exact limit even when the combined payload would exceed it.



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