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

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


The following commit(s) were added to refs/heads/spill_and_reserve by this push:
     new f37793ff77c improve pipeline task debug log
f37793ff77c is described below

commit f37793ff77c4cec35e960c9cb1b92d7d5b828be7
Author: jacktengg <tengjianp...@selectdb.com>
AuthorDate: Mon Jan 20 10:14:49 2025 +0800

    improve pipeline task debug log
---
 be/src/pipeline/pipeline_fragment_context.cpp | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/be/src/pipeline/pipeline_fragment_context.cpp 
b/be/src/pipeline/pipeline_fragment_context.cpp
index 2d96b7f7b1d..3d1eb692293 100644
--- a/be/src/pipeline/pipeline_fragment_context.cpp
+++ b/be/src/pipeline/pipeline_fragment_context.cpp
@@ -182,7 +182,17 @@ void PipelineFragmentContext::cancel(const Status reason) {
     }
     // Timeout is a special error code, we need print current stack to debug 
timeout issue.
     if (reason.is<ErrorCode::TIMEOUT>()) {
-        LOG(WARNING) << "PipelineFragmentContext is cancelled due to timeout : 
" << debug_string();
+        auto dbg_str = debug_string();
+        constexpr size_t max_log_size = 30000 - 100;
+        size_t pos = 0;
+        size_t total_size = dbg_str.size();
+        size_t tmp_size = std::min(max_log_size, total_size);
+        LOG(WARNING) << "PipelineFragmentContext is cancelled due to timeout:";
+        while (pos < total_size) {
+            tmp_size = std::min(max_log_size, total_size - pos);
+            LOG(WARNING) << "===" << std::string(dbg_str.data() + pos, 
tmp_size);
+            pos += tmp_size;
+        }
     }
 
     // `ILLEGAL_STATE` means queries this fragment belongs to was not found in 
FE (maybe finished)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to