This is an automated email from the ASF dual-hosted git repository.
gabriellee 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 8f2202c89d4 [minor](log) Add debug info in operators (#28211)
8f2202c89d4 is described below
commit 8f2202c89d40140d8e9a7e81e0176c44c745dc1d
Author: Gabriel <[email protected]>
AuthorDate: Mon Dec 11 10:02:24 2023 +0800
[minor](log) Add debug info in operators (#28211)
---
be/src/pipeline/exec/scan_operator.cpp | 17 +++++++++--------
be/src/pipeline/pipeline_x/pipeline_x_task.cpp | 4 ++--
be/src/vec/exec/scan/scanner_context.h | 1 +
3 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/be/src/pipeline/exec/scan_operator.cpp
b/be/src/pipeline/exec/scan_operator.cpp
index e1e17e0ccf6..482d71c6265 100644
--- a/be/src/pipeline/exec/scan_operator.cpp
+++ b/be/src/pipeline/exec/scan_operator.cpp
@@ -561,14 +561,15 @@ std::string ScanLocalState<Derived>::debug_string(int
indentation_level) const {
PipelineXLocalState<>::debug_string(indentation_level),
_eos.load());
if (_scanner_ctx) {
fmt::format_to(debug_string_buffer, "");
- fmt::format_to(debug_string_buffer,
- ", Scanner Context: (_is_finished = {}, _should_stop =
{}, "
- "_num_running_scanners={}, "
- "_num_scheduling_ctx = {}, _num_unfinished_scanners =
{})",
- _scanner_ctx->is_finished(),
_scanner_ctx->should_stop(),
- _scanner_ctx->get_num_running_scanners(),
- _scanner_ctx->get_num_scheduling_ctx(),
- _scanner_ctx->get_num_unfinished_scanners());
+ fmt::format_to(
+ debug_string_buffer,
+ ", Scanner Context: (_is_finished = {}, _should_stop = {}, "
+ "_num_running_scanners={}, "
+ "_num_scheduling_ctx = {}, _num_unfinished_scanners = {},
status = {}, error = {})",
+ _scanner_ctx->is_finished(), _scanner_ctx->should_stop(),
+ _scanner_ctx->get_num_running_scanners(),
_scanner_ctx->get_num_scheduling_ctx(),
+ _scanner_ctx->get_num_unfinished_scanners(),
_scanner_ctx->status().to_string(),
+ _scanner_ctx->status_error());
}
return fmt::to_string(debug_string_buffer);
diff --git a/be/src/pipeline/pipeline_x/pipeline_x_task.cpp
b/be/src/pipeline/pipeline_x/pipeline_x_task.cpp
index 7657d82b7fa..cfe859b2e7c 100644
--- a/be/src/pipeline/pipeline_x/pipeline_x_task.cpp
+++ b/be/src/pipeline/pipeline_x/pipeline_x_task.cpp
@@ -340,10 +340,10 @@ std::string PipelineXTask::debug_string() {
fmt::format_to(debug_string_buffer,
"PipelineTask[this = {}, state = {}, data state = {}, dry
run = {}, elapse time "
- "= {}ns], block dependency = {}, \noperators: ",
+ "= {}ns], block dependency = {}, is running =
{}\noperators: ",
(void*)this, get_state_name(_cur_state), (int)_data_state,
_dry_run,
MonotonicNanos() - _fragment_context->create_time(),
- _blocked_dep ? _blocked_dep->debug_string() : "NULL");
+ _blocked_dep ? _blocked_dep->debug_string() : "NULL",
is_running());
for (size_t i = 0; i < _operators.size(); i++) {
fmt::format_to(
debug_string_buffer, "\n{}",
diff --git a/be/src/vec/exec/scan/scanner_context.h
b/be/src/vec/exec/scan/scanner_context.h
index c6e88567502..33d2162906d 100644
--- a/be/src/vec/exec/scan/scanner_context.h
+++ b/be/src/vec/exec/scan/scanner_context.h
@@ -118,6 +118,7 @@ public:
virtual bool done() { return _is_finished || _should_stop; }
bool is_finished() { return _is_finished.load(); }
bool should_stop() { return _should_stop.load(); }
+ bool status_error() { return _status_error.load(); }
void inc_num_running_scanners(int32_t scanner_inc);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]