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

gavinchou 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 5c8faa4372e [be](chore) add some debug info to be logs (#65452)
5c8faa4372e is described below

commit 5c8faa4372ee30d2c2a76b8bad0fa2dba85d14b8
Author: yiguolei <[email protected]>
AuthorDate: Tue Jul 14 13:17:13 2026 +0800

    [be](chore) add some debug info to be logs (#65452)
---
 be/src/runtime/query_context.cpp      |  7 ++++++-
 be/src/storage/tablet/tablet_schema.h | 12 ++++++++++++
 be/src/util/threadpool.cpp            |  5 +++++
 be/src/util/work_thread_pool.hpp      |  3 +++
 4 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/be/src/runtime/query_context.cpp b/be/src/runtime/query_context.cpp
index 4e1fa2ab9ec..745e44de59e 100644
--- a/be/src/runtime/query_context.cpp
+++ b/be/src/runtime/query_context.cpp
@@ -241,7 +241,12 @@ QueryContext::~QueryContext() {
         
ExecEnv::GetInstance()->fragment_mgr()->remove_query_context(this->_query_id);
     }
     // the only one msg shows query's end. any other msg should append to it 
if need.
-    LOG_INFO("Query {} deconstructed, mem_tracker: {}", 
print_id(this->_query_id), mem_tracker_msg);
+    timespec now;
+    clock_gettime(CLOCK_MONOTONIC, &now);
+    int64_t elapsed_ms = (now.tv_sec - _query_arrival_timestamp.tv_sec) * 
1000LL +
+                         (now.tv_nsec - _query_arrival_timestamp.tv_nsec) / 
1000000LL;
+    LOG_INFO("Query {} deconstructed, elapsed_ms: {}, mem_tracker: {}", 
print_id(this->_query_id),
+             elapsed_ms, mem_tracker_msg);
 }
 
 void QueryContext::set_ready_to_execute(Status reason) {
diff --git a/be/src/storage/tablet/tablet_schema.h 
b/be/src/storage/tablet/tablet_schema.h
index 9157839742c..bf4598e2bb9 100644
--- a/be/src/storage/tablet/tablet_schema.h
+++ b/be/src/storage/tablet/tablet_schema.h
@@ -467,9 +467,21 @@ public:
             return column->visible() && !column->is_key();
         });
     }
+    // num_key_columns: Total number of sort key columns in the table, 
determined by the key columns
+    // specified in DUPLICATE KEY/UNIQUE KEY/AGGREGATE KEY when creating the 
table, used for complete data sorting
+    // Example: CREATE TABLE t(a INT, b DATE, c VARCHAR) DUPLICATE KEY(a, b, c)
+    //          Then num_key_columns = 3 (columns a, b, c are all sort keys)
     size_t num_key_columns() const { return _num_key_columns; }
     const std::vector<uint32_t>& cluster_key_uids() const { return 
_cluster_key_uids; }
     size_t num_null_columns() const { return _num_null_columns; }
+    // num_short_key_columns: Number of columns used to build the Short Key 
Index, automatically calculated by FE
+    // Limited by max column count (default 3) and max bytes (default 36 
bytes). Types like float/double/STRING/JSONB
+    // cannot be used as short keys. VARCHAR can only be the last short key 
column. Optimizes index size and query performance.
+    // Example: CREATE TABLE t(a INT, b DATE, c VARCHAR) DUPLICATE KEY(a, b, c)
+    //          Then num_short_key_columns = 3 (a, b, c all meet criteria, c 
as VARCHAR is the last short key)
+    // Example: CREATE TABLE t(a INT, b DOUBLE, c DATE) DUPLICATE KEY(a, b, c)
+    //          Then num_short_key_columns = 1 (b is DOUBLE type which cannot 
be short key, stops at b)
+    // short key's size is limited to 36 bytes, because it will be loaded to 
memory during segment loaded.
     size_t num_short_key_columns() const { return _num_short_key_columns; }
     size_t num_rows_per_row_block() const { return _num_rows_per_row_block; }
     size_t num_variant_columns() const { return _num_variant_columns; };
diff --git a/be/src/util/threadpool.cpp b/be/src/util/threadpool.cpp
index 682c53eb4fa..194b80a8423 100644
--- a/be/src/util/threadpool.cpp
+++ b/be/src/util/threadpool.cpp
@@ -329,6 +329,11 @@ Status ThreadPool::init() {
         thread_pool_max_queue_size->set_value(get_max_queue_size());
         thread_pool_max_threads->set_value(max_threads());
     });
+    LOG(INFO) << fmt::format(
+            "Thread pool '{}' initialized: min_threads={}, max_threads={}, 
max_queue_size={}, "
+            "idle_timeout_ms={}, workload_group='{}'",
+            _name, _min_threads, _max_threads, _max_queue_size, 
_idle_timeout.count(),
+            _workload_group);
     return Status::OK();
 }
 
diff --git a/be/src/util/work_thread_pool.hpp b/be/src/util/work_thread_pool.hpp
index 27b7e3d6bb6..17a2458663d 100644
--- a/be/src/util/work_thread_pool.hpp
+++ b/be/src/util/work_thread_pool.hpp
@@ -62,6 +62,9 @@ public:
             _threads.create_thread(
                     std::bind<void>(std::mem_fn(&WorkThreadPool::work_thread), 
this, i));
         }
+        LOG(INFO) << fmt::format("{} '{}' initialized: num_threads={}, 
queue_size={}",
+                                 (Priority ? "PriorityThreadPool" : 
"WorkThreadPool"), _name,
+                                 num_threads, queue_size);
     }
 
     // Destructor ensures that all threads are terminated before this object 
is freed


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

Reply via email to