@@ -100,7 +100,7 @@ bool ExchangeSinkLocalState::transfer_large_data_by_brpc() const {
100
100
}
101
101
102
102
Status ExchangeSinkLocalState::init (RuntimeState* state, LocalSinkStateInfo& info) {
103
- RETURN_IF_ERROR (PipelineXSinkLocalState<> ::init (state, info));
103
+ RETURN_IF_ERROR (Base ::init (state, info));
104
104
SCOPED_TIMER (exec_time_counter ());
105
105
SCOPED_TIMER (_open_timer);
106
106
_sender_id = info.sender_id ;
@@ -174,9 +174,7 @@ Status ExchangeSinkLocalState::init(RuntimeState* state, LocalSinkStateInfo& inf
174
174
id, p._dest_node_id , _sender_id, _state->be_number (), state->get_query_ctx ());
175
175
176
176
register_channels (_sink_buffer.get ());
177
-
178
- _exchange_sink_dependency = AndDependency::create_shared (
179
- _parent->operator_id (), _parent->node_id (), state->get_query_ctx ());
177
+ auto * _exchange_sink_dependency = _dependency;
180
178
_queue_dependency = ExchangeSinkQueueDependency::create_shared (
181
179
_parent->operator_id (), _parent->node_id (), state->get_query_ctx ());
182
180
_sink_buffer->set_dependency (_queue_dependency, _finish_dependency);
@@ -237,7 +235,7 @@ Status ExchangeSinkLocalState::init(RuntimeState* state, LocalSinkStateInfo& inf
237
235
}
238
236
239
237
Status ExchangeSinkLocalState::open (RuntimeState* state) {
240
- RETURN_IF_ERROR (PipelineXSinkLocalState<> ::open (state));
238
+ RETURN_IF_ERROR (Base ::open (state));
241
239
auto & p = _parent->cast <ExchangeSinkOperatorX>();
242
240
if (p._part_type == TPartitionType::HASH_PARTITIONED ||
243
241
p._part_type == TPartitionType::BUCKET_SHFFULE_HASH_PARTITIONED) {
@@ -522,8 +520,7 @@ Status ExchangeSinkOperatorX::try_close(RuntimeState* state, Status exec_status)
522
520
523
521
std::string ExchangeSinkLocalState::debug_string (int indentation_level) const {
524
522
fmt::memory_buffer debug_string_buffer;
525
- fmt::format_to (debug_string_buffer, " {}" ,
526
- PipelineXSinkLocalState<>::debug_string (indentation_level));
523
+ fmt::format_to (debug_string_buffer, " {}" , Base::debug_string (indentation_level));
527
524
fmt::format_to (debug_string_buffer, " , Sink Buffer: (_should_stop = {}, _busy_channels = {})" ,
528
525
_sink_buffer->_should_stop .load (), _sink_buffer->_busy_channels .load ());
529
526
return fmt::to_string (debug_string_buffer);
@@ -536,6 +533,7 @@ Status ExchangeSinkLocalState::close(RuntimeState* state, Status exec_status) {
536
533
SCOPED_TIMER (exec_time_counter ());
537
534
SCOPED_TIMER (_close_timer);
538
535
COUNTER_UPDATE (_wait_queue_timer, _queue_dependency->watcher_elapse_time ());
536
+ COUNTER_SET (_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time ());
539
537
if (_broadcast_dependency) {
540
538
COUNTER_UPDATE (_wait_broadcast_buffer_timer, _broadcast_dependency->watcher_elapse_time ());
541
539
}
@@ -545,7 +543,7 @@ Status ExchangeSinkLocalState::close(RuntimeState* state, Status exec_status) {
545
543
}
546
544
_sink_buffer->update_profile (profile ());
547
545
_sink_buffer->close ();
548
- return PipelineXSinkLocalState<> ::close (state, exec_status);
546
+ return Base ::close (state, exec_status);
549
547
}
550
548
551
549
} // namespace doris::pipeline
0 commit comments