Skip to content

Commit 9e11edc

Browse files
committed
[opt](profile) change the node name format of MultiCastDataStreamer
1 parent 73fe371 commit 9e11edc

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

be/src/pipeline/exec/multi_cast_data_stream_sink.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,16 @@ namespace doris::pipeline {
2626

2727
std::string MultiCastDataStreamSinkLocalState::name_suffix() {
2828
auto* parent = static_cast<MultiCastDataStreamSinkOperatorX*>(_parent);
29-
return fmt::format(operator_name_suffix, parent->operator_id());
29+
auto& dest_ids = parent->dests_id();
30+
std::string result = "(";
31+
for (size_t i = 0; i < dest_ids.size(); ++i) {
32+
if (i > 0) {
33+
result += ", ";
34+
}
35+
result += fmt::format("dest_id={}", dest_ids[i]);
36+
}
37+
result += ")";
38+
return fmt::format(result + operator_name_suffix, parent->operator_id());
3039
}
3140

3241
std::shared_ptr<BasicSharedState> MultiCastDataStreamSinkOperatorX::create_shared_state() const {

be/src/pipeline/pipeline_fragment_context.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,8 +1139,9 @@ Status PipelineFragmentContext::_create_data_sink(ObjectPool* pool, const TDataS
11391139
OperatorPtr source_op;
11401140
// 1. create and set the source operator of multi_cast_data_stream_source for new pipeline
11411141
source_op = std::make_shared<MultiCastDataStreamerSourceOperatorX>(
1142-
multi_cast_node_id, i, pool, thrift_sink.multi_cast_stream_sink.sinks[i],
1143-
row_desc, /*operator_id=*/source_id);
1142+
/*node_id*/ source_id, /*consumer_id*/ i, pool,
1143+
thrift_sink.multi_cast_stream_sink.sinks[i], row_desc,
1144+
/*operator_id=*/source_id);
11441145
RETURN_IF_ERROR(new_pipeline->add_operator(
11451146
source_op, params.__isset.parallel_instances ? params.parallel_instances : 0));
11461147
// 2. create and set sink operator of data stream sender for new pipeline

0 commit comments

Comments
 (0)