From 18338a33b6b1fe524aed573bc0fb150d899ea697 Mon Sep 17 00:00:00 2001 From: yiguolei <676222867@qq.com> Date: Fri, 1 Dec 2023 16:56:29 +0800 Subject: [PATCH] [bugfix](mergeprofile) ignore null profile to avoid bug (#27860) --------- Co-authored-by: yiguolei --- be/src/vec/sink/async_writer_sink.h | 4 +--- .../java/org/apache/doris/common/util/RuntimeProfile.java | 7 ++++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/be/src/vec/sink/async_writer_sink.h b/be/src/vec/sink/async_writer_sink.h index a7e30f0bcb..8963f9a4ec 100644 --- a/be/src/vec/sink/async_writer_sink.h +++ b/be/src/vec/sink/async_writer_sink.h @@ -61,10 +61,8 @@ public: RETURN_IF_ERROR(DataSink::prepare(state)); // Prepare the exprs to run. RETURN_IF_ERROR(VExpr::prepare(_output_vexpr_ctxs, state, _row_desc)); - std::stringstream title; - title << _name << " (frag_id=" << state->fragment_instance_id() << ")"; // create profile - _profile = state->obj_pool()->add(new RuntimeProfile(title.str())); + _profile = state->obj_pool()->add(new RuntimeProfile(_name)); init_sink_common_profile(); return Status::OK(); } diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/util/RuntimeProfile.java b/fe/fe-core/src/main/java/org/apache/doris/common/util/RuntimeProfile.java index 41e3738f0a..251e6417fb 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/common/util/RuntimeProfile.java +++ b/fe/fe-core/src/main/java/org/apache/doris/common/util/RuntimeProfile.java @@ -448,7 +448,12 @@ public class RuntimeProfile { private static List getChildListFromLists(String profileName, List profiles) { List ret = new ArrayList(); for (RuntimeProfile profile : profiles) { - ret.add(profile.getChildMap().get(profileName)); + RuntimeProfile tmp = profile.getChildMap().get(profileName); + if (tmp != null) { + ret.add(profile.getChildMap().get(profileName)); + } else { + LOG.debug("could not find {} from {}", profileName, profile.toString()); + } } return ret; }