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

lihaopeng 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 7735ad6576e [Log](topn) Log query id in topn two read and change the 
timeout to uery timeout (#53450)
7735ad6576e is described below

commit 7735ad6576e21c54535739c452c0d55115039a66
Author: HappenLee <[email protected]>
AuthorDate: Fri Jul 18 14:33:59 2025 +0800

    [Log](topn) Log query id in topn two read and change the timeout to uery 
timeout (#53450)
    
    1. Log query id in topn two read
    2. change the timeout to use query timeout
---
 be/src/common/config.cpp                               |  1 -
 be/src/common/config.h                                 |  1 -
 be/src/exec/rowid_fetcher.cpp                          | 16 +++++++++-------
 be/src/pipeline/exec/materialization_sink_operator.cpp |  2 +-
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/be/src/common/config.cpp b/be/src/common/config.cpp
index f2dd6002218..98d3faac407 100644
--- a/be/src/common/config.cpp
+++ b/be/src/common/config.cpp
@@ -310,7 +310,6 @@ 
DEFINE_Int32(doris_max_remote_scanner_thread_pool_thread_num, "-1");
 DEFINE_Int32(doris_scanner_thread_pool_queue_size, "102400");
 // default thrift client connect timeout(in seconds)
 DEFINE_mInt32(thrift_connect_timeout_seconds, "3");
-DEFINE_mInt32(fetch_rpc_timeout_seconds, "30");
 
 // default thrift client retry interval (in milliseconds)
 DEFINE_mInt64(thrift_client_retry_interval_ms, "1000");
diff --git a/be/src/common/config.h b/be/src/common/config.h
index f02acaa97a1..28862b363e3 100644
--- a/be/src/common/config.h
+++ b/be/src/common/config.h
@@ -353,7 +353,6 @@ 
DECLARE_Int32(doris_max_remote_scanner_thread_pool_thread_num);
 DECLARE_Int32(doris_scanner_thread_pool_queue_size);
 // default thrift client connect timeout(in seconds)
 DECLARE_mInt32(thrift_connect_timeout_seconds);
-DECLARE_mInt32(fetch_rpc_timeout_seconds);
 // default thrift client retry interval (in milliseconds)
 DECLARE_mInt64(thrift_client_retry_interval_ms);
 // max message size of thrift request
diff --git a/be/src/exec/rowid_fetcher.cpp b/be/src/exec/rowid_fetcher.cpp
index 07cd653b175..8b7ddcd5994 100644
--- a/be/src/exec/rowid_fetcher.cpp
+++ b/be/src/exec/rowid_fetcher.cpp
@@ -251,7 +251,7 @@ Status RowIDFetcher::fetch(const vectorized::ColumnPtr& 
column_row_ids,
     std::vector<brpc::Controller> cntls(_stubs.size());
     bthread::CountdownEvent counter(cast_set<int>(_stubs.size()));
     for (size_t i = 0; i < _stubs.size(); ++i) {
-        cntls[i].set_timeout_ms(config::fetch_rpc_timeout_seconds * 1000);
+        
cntls[i].set_timeout_ms(_fetch_option.runtime_state->execution_timeout() * 
1000);
         auto callback = brpc::NewCallback(fetch_callback, &counter);
         _stubs[i]->multiget_data(&cntls[i], &mget_req, &resps[i], callback);
     }
@@ -469,16 +469,17 @@ Status RowIdStorageReader::read_by_rowids(const 
PMultiGetRequest& request,
 
     LOG(INFO) << "Query stats: "
               << fmt::format(
+                         "query_id:{}, "
                          "hit_cached_pages:{}, total_pages_read:{}, 
compressed_bytes_read:{}, "
                          "io_latency:{}ns, "
                          "uncompressed_bytes_read:{},"
                          "bytes_read:{},"
                          "acquire_tablet_ms:{}, acquire_rowsets_ms:{}, 
acquire_segments_ms:{}, "
                          "lookup_row_data_ms:{}",
-                         stats.cached_pages_num, stats.total_pages_num, 
stats.compressed_bytes_read,
-                         stats.io_ns, stats.uncompressed_bytes_read, 
stats.bytes_read,
-                         acquire_tablet_ms, acquire_rowsets_ms, 
acquire_segments_ms,
-                         lookup_row_data_ms);
+                         print_id(request.query_id()), stats.cached_pages_num,
+                         stats.total_pages_num, stats.compressed_bytes_read, 
stats.io_ns,
+                         stats.uncompressed_bytes_read, stats.bytes_read, 
acquire_tablet_ms,
+                         acquire_rowsets_ms, acquire_segments_ms, 
lookup_row_data_ms);
     return Status::OK();
 }
 
@@ -583,6 +584,7 @@ Status RowIdStorageReader::read_by_rowids(const 
PMultiGetRequestV2& request,
 
         LOG(INFO) << "Query stats: "
                   << fmt::format(
+                             "query_id:{}, "
                              "Internal table:"
                              "hit_cached_pages:{}, total_pages_read:{}, 
compressed_bytes_read:{}, "
                              "io_latency:{}ns, uncompressed_bytes_read:{}, 
bytes_read:{}, "
@@ -590,8 +592,8 @@ Status RowIdStorageReader::read_by_rowids(const 
PMultiGetRequestV2& request,
                              "lookup_row_data_ms:{}, file_types:[{}]; "
                              "External table : init_reader_ms:{}, 
get_block_ms:{}, "
                              "external_scan_range_cnt:{}",
-                             stats.cached_pages_num, stats.total_pages_num,
-                             stats.compressed_bytes_read, stats.io_ns,
+                             print_id(request.query_id()), 
stats.cached_pages_num,
+                             stats.total_pages_num, 
stats.compressed_bytes_read, stats.io_ns,
                              stats.uncompressed_bytes_read, stats.bytes_read, 
acquire_tablet_ms,
                              acquire_rowsets_ms, acquire_segments_ms, 
lookup_row_data_ms,
                              file_type_stats, external_init_reader_avg_ms,
diff --git a/be/src/pipeline/exec/materialization_sink_operator.cpp 
b/be/src/pipeline/exec/materialization_sink_operator.cpp
index 46c555b5926..936c45fa755 100644
--- a/be/src/pipeline/exec/materialization_sink_operator.cpp
+++ b/be/src/pipeline/exec/materialization_sink_operator.cpp
@@ -133,7 +133,7 @@ Status MaterializationSinkOperatorX::sink(RuntimeState* 
state, vectorized::Block
             auto callback = 
MaterializationCallback<PMultiGetResponseV2>::create_shared(
                     state->get_task_execution_context(), 
local_state._shared_state,
                     rpc_struct.rpc_timer, 
print_id(rpc_struct.request.query_id()));
-            callback->cntl_->set_timeout_ms(config::fetch_rpc_timeout_seconds 
* 1000);
+            callback->cntl_->set_timeout_ms(state->execution_timeout() * 1000);
             auto closure =
                     AutoReleaseClosure<int, 
::doris::DummyBrpcCallback<PMultiGetResponseV2>>::
                             create_unique(


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

Reply via email to