This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new c22eb7638ed [Fix](executor)Fix query runtime statistics report failed 
#31064
c22eb7638ed is described below

commit c22eb7638ed987879af757fb251f5373fbe74cec
Author: wangbo <[email protected]>
AuthorDate: Mon Feb 19 09:57:11 2024 +0800

    [Fix](executor)Fix query runtime statistics report failed #31064
---
 be/src/runtime/fragment_mgr.cpp  | 3 +--
 be/src/runtime/query_context.cpp | 3 ++-
 be/src/runtime/query_context.h   | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/be/src/runtime/fragment_mgr.cpp b/be/src/runtime/fragment_mgr.cpp
index 7b96f96811e..ec8e36d34c6 100644
--- a/be/src/runtime/fragment_mgr.cpp
+++ b/be/src/runtime/fragment_mgr.cpp
@@ -612,10 +612,9 @@ Status FragmentMgr::_get_query_ctx(const Params& params, 
TUniqueId query_id, boo
         // This may be a first fragment request of the query.
         // Create the query fragments context.
         query_ctx = QueryContext::create_shared(query_id, 
params.fragment_num_on_host, _exec_env,
-                                                params.query_options);
+                                                params.query_options, 
params.coord);
         RETURN_IF_ERROR(DescriptorTbl::create(&(query_ctx->obj_pool), 
params.desc_tbl,
                                               &(query_ctx->desc_tbl)));
-        query_ctx->coord_addr = params.coord;
         // set file scan range params
         if (params.__isset.file_scan_params) {
             query_ctx->file_scan_range_params_map = params.file_scan_params;
diff --git a/be/src/runtime/query_context.cpp b/be/src/runtime/query_context.cpp
index e1c26cfcbb9..dadb6ada172 100644
--- a/be/src/runtime/query_context.cpp
+++ b/be/src/runtime/query_context.cpp
@@ -34,12 +34,13 @@ public:
 };
 
 QueryContext::QueryContext(TUniqueId query_id, int total_fragment_num, 
ExecEnv* exec_env,
-                           const TQueryOptions& query_options)
+                           const TQueryOptions& query_options, TNetworkAddress 
coord_addr)
         : fragment_num(total_fragment_num),
           timeout_second(-1),
           _query_id(query_id),
           _exec_env(exec_env),
           _query_options(query_options) {
+    this->coord_addr = coord_addr;
     _start_time = VecDateTimeValue::local_time();
     _shared_hash_table_controller.reset(new 
vectorized::SharedHashTableController());
     _shared_scanner_controller.reset(new 
vectorized::SharedScannerController());
diff --git a/be/src/runtime/query_context.h b/be/src/runtime/query_context.h
index 806470fbd4c..cf4321beab3 100644
--- a/be/src/runtime/query_context.h
+++ b/be/src/runtime/query_context.h
@@ -70,7 +70,7 @@ class QueryContext {
 
 public:
     QueryContext(TUniqueId query_id, int total_fragment_num, ExecEnv* exec_env,
-                 const TQueryOptions& query_options);
+                 const TQueryOptions& query_options, TNetworkAddress 
coord_addr);
 
     ~QueryContext();
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to