This is an automated email from the ASF dual-hosted git repository.
yiguolei 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 c3261f49314 [fix](profile) Fix print profile in be log (#34166)
c3261f49314 is described below
commit c3261f4931448620ba92b26807f6849d7a10e526
Author: zhiqiang <[email protected]>
AuthorDate: Sat Apr 27 19:20:40 2024 +0800
[fix](profile) Fix print profile in be log (#34166)
---
be/src/pipeline/pipeline_fragment_context.cpp | 13 +++++++++++--
.../java/org/apache/doris/planner/StreamLoadPlanner.java | 2 ++
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/be/src/pipeline/pipeline_fragment_context.cpp
b/be/src/pipeline/pipeline_fragment_context.cpp
index 03de71f3c8d..9cc71afd4d7 100644
--- a/be/src/pipeline/pipeline_fragment_context.cpp
+++ b/be/src/pipeline/pipeline_fragment_context.cpp
@@ -1505,6 +1505,13 @@ void PipelineFragmentContext::_close_fragment_instance()
{
Defer defer_op {[&]() { _is_fragment_instance_closed = true; }};
_runtime_profile->total_time_counter()->update(_fragment_watcher.elapsed_time());
static_cast<void>(send_report(true));
+ // Print profile content in info log is a tempoeray solution for stream
load.
+ // Since stream load does not have someting like coordinator on FE, so
+ // backend can not report profile to FE, ant its profile can not be shown
+ // in the same way with other query. So we print the profile content to
info log.
+ // Print profile content in log is harmful for log readability, info log
will be
+ // full of profile content, and not just profile of stream load.
+ // We know it, but currently we do not have a cheap and good solution for
this.
if (_runtime_state->enable_profile()) {
std::stringstream ss;
// Compute the _local_time_percent before pretty_print the
runtime_profile
@@ -1513,8 +1520,10 @@ void PipelineFragmentContext::_close_fragment_instance()
{
// After add the operation, the print out like that:
// UNION_NODE (id=0):(Active: 56.720us, non-child: 82.53%)
// We can easily know the exec node execute time without child time
consumed.
- _runtime_state->runtime_profile()->compute_time_in_profile();
- _runtime_state->runtime_profile()->pretty_print(&ss);
+ for (const auto& runtime_profile_ptr :
_runtime_state->pipeline_id_to_profile()) {
+ runtime_profile_ptr->pretty_print(&ss);
+ }
+
if (_runtime_state->load_channel_profile()) {
_runtime_state->load_channel_profile()->pretty_print(&ss);
}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/planner/StreamLoadPlanner.java
b/fe/fe-core/src/main/java/org/apache/doris/planner/StreamLoadPlanner.java
index e7bd2c80453..10dc8c3a432 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/StreamLoadPlanner.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/StreamLoadPlanner.java
@@ -332,6 +332,7 @@ public class StreamLoadPlanner {
queryOptions.setEnablePipelineXEngine(Config.enable_pipeline_load);
queryOptions.setBeExecVersion(Config.be_exec_version);
queryOptions.setIsReportSuccess(taskInfo.getEnableProfile());
+ queryOptions.setEnableProfile(taskInfo.getEnableProfile());
queryOptions.setEnableMemtableOnSinkNode(enableMemtableOnSinkNode);
params.setQueryOptions(queryOptions);
TQueryGlobals queryGlobals = new TQueryGlobals();
@@ -569,6 +570,7 @@ public class StreamLoadPlanner {
queryOptions.setEnablePipelineXEngine(Config.enable_pipeline_load);
queryOptions.setBeExecVersion(Config.be_exec_version);
queryOptions.setIsReportSuccess(taskInfo.getEnableProfile());
+ queryOptions.setEnableProfile(taskInfo.getEnableProfile());
queryOptions.setEnableMemtableOnSinkNode(enableMemtableOnSinkNode);
pipParams.setQueryOptions(queryOptions);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]