This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new 24b79fd240f [branch-2.1](log) Pick all BE execution log reduction
(#43267)
24b79fd240f is described below
commit 24b79fd240f68d8c276544434373532006b4c41c
Author: zclllhhjj <[email protected]>
AuthorDate: Tue Nov 12 18:18:59 2024 +0800
[branch-2.1](log) Pick all BE execution log reduction (#43267)
pick https://github.com/apache/doris/pull/42383
pick https://github.com/apache/doris/pull/42900
---
be/src/common/status.h | 2 +-
be/src/pipeline/exec/result_sink_operator.cpp | 9 +++++----
be/src/pipeline/pipeline_fragment_context.cpp | 3 ---
be/src/runtime/fragment_mgr.cpp | 8 +++++---
be/src/runtime/query_context.cpp | 4 +++-
5 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/be/src/common/status.h b/be/src/common/status.h
index 3b44e9ed2ba..4d26ba5342a 100644
--- a/be/src/common/status.h
+++ b/be/src/common/status.h
@@ -471,7 +471,7 @@ public:
ERROR_CTOR_NOSTACK(Cancelled, CANCELLED)
ERROR_CTOR(MemoryLimitExceeded, MEM_LIMIT_EXCEEDED)
ERROR_CTOR(RpcError, THRIFT_RPC_ERROR)
- ERROR_CTOR(TimedOut, TIMEOUT)
+ ERROR_CTOR_NOSTACK(TimedOut, TIMEOUT)
ERROR_CTOR_NOSTACK(TooManyTasks, TOO_MANY_TASKS)
ERROR_CTOR(Uninitialized, UNINITIALIZED)
ERROR_CTOR(Aborted, ABORTED)
diff --git a/be/src/pipeline/exec/result_sink_operator.cpp
b/be/src/pipeline/exec/result_sink_operator.cpp
index 52daf425f55..8f33aa9bed2 100644
--- a/be/src/pipeline/exec/result_sink_operator.cpp
+++ b/be/src/pipeline/exec/result_sink_operator.cpp
@@ -17,12 +17,12 @@
#include "result_sink_operator.h"
+#include <fmt/format.h>
#include <sys/select.h>
#include <memory>
#include "common/config.h"
-#include "common/object_pool.h"
#include "exec/rowid_fetcher.h"
#include "pipeline/exec/operator.h"
#include "runtime/buffer_control_block.h"
@@ -202,9 +202,10 @@ Status ResultSinkLocalState::close(RuntimeState* state,
Status exec_status) {
final_status = st;
}
- LOG_INFO("Query {} result sink closed with status {} and has written
{} rows",
- print_id(state->query_id()),
final_status.to_string_no_stack(),
- _writer->get_written_rows());
+ VLOG_NOTICE << fmt::format(
+ "Query {} result sink closed with status {} and has written {}
rows",
+ print_id(state->query_id()), final_status.to_string_no_stack(),
+ _writer->get_written_rows());
}
// close sender, this is normal path end
diff --git a/be/src/pipeline/pipeline_fragment_context.cpp
b/be/src/pipeline/pipeline_fragment_context.cpp
index e514a5d6b97..30a7ce07315 100644
--- a/be/src/pipeline/pipeline_fragment_context.cpp
+++ b/be/src/pipeline/pipeline_fragment_context.cpp
@@ -250,9 +250,6 @@ Status PipelineFragmentContext::prepare(const
doris::TPipelineFragmentParams& re
auto* fragment_context = this;
- LOG_INFO("Preparing instance {}|{}, backend_num {}", print_id(_query_id),
- print_id(local_params.fragment_instance_id),
local_params.backend_num);
-
// 1. init _runtime_state
_runtime_state = RuntimeState::create_unique(
local_params.fragment_instance_id, request.query_id,
request.fragment_id,
diff --git a/be/src/runtime/fragment_mgr.cpp b/be/src/runtime/fragment_mgr.cpp
index cd8eabb0642..3a4c752ccae 100644
--- a/be/src/runtime/fragment_mgr.cpp
+++ b/be/src/runtime/fragment_mgr.cpp
@@ -698,12 +698,13 @@ Status FragmentMgr::exec_plan_fragment(const
TPipelineFragmentParams& params,
}
Status FragmentMgr::start_query_execution(const PExecPlanFragmentStartRequest*
request) {
+ TUniqueId query_id;
+ query_id.__set_hi(request->query_id().hi());
+ query_id.__set_lo(request->query_id().lo());
std::shared_ptr<QueryContext> q_ctx = nullptr;
{
std::lock_guard<std::mutex> lock(_lock);
- TUniqueId query_id;
- query_id.__set_hi(request->query_id().hi());
- query_id.__set_lo(request->query_id().lo());
+
auto search = _query_ctx_map.find(query_id);
if (search == _query_ctx_map.end()) {
return Status::InternalError(
@@ -714,6 +715,7 @@ Status FragmentMgr::start_query_execution(const
PExecPlanFragmentStartRequest* r
q_ctx = search->second;
}
q_ctx->set_ready_to_execute(false);
+ LOG_INFO("Query {} start execution", print_id(query_id));
return Status::OK();
}
diff --git a/be/src/runtime/query_context.cpp b/be/src/runtime/query_context.cpp
index fa4321ad6c4..708fd4b2fc3 100644
--- a/be/src/runtime/query_context.cpp
+++ b/be/src/runtime/query_context.cpp
@@ -20,6 +20,7 @@
#include <exception>
#include <memory>
+#include "common/logging.h"
#include "pipeline/pipeline_fragment_context.h"
#include "pipeline/pipeline_x/dependency.h"
#include "runtime/runtime_query_statistics_mgr.h"
@@ -185,7 +186,8 @@ QueryContext::~QueryContext() {
_exec_env->spill_stream_mgr()->async_cleanup_query(_query_id);
DorisMetrics::instance()->query_ctx_cnt->increment(-1);
- LOG_INFO("Query {} deconstructed, {}", print_id(this->_query_id),
mem_tracker_msg);
+ // 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);
}
void QueryContext::set_ready_to_execute(bool is_cancelled) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]