From 5cb5121cf6e95409ca0ce483e108f0846082c192 Mon Sep 17 00:00:00 2001 From: HappenLee Date: Mon, 23 Oct 2023 15:52:43 +0800 Subject: [PATCH] [coverage](pipeline) Remove unless code and add call method for coverage (#25552) Remove unless code and add call method for coverage --- be/src/pipeline/exec/exchange_sink_operator.h | 2 -- be/src/pipeline/exec/multi_cast_data_stream_sink.h | 2 +- be/src/util/proto_util.h | 4 +--- be/src/vec/sink/vdata_stream_sender.cpp | 2 +- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/be/src/pipeline/exec/exchange_sink_operator.h b/be/src/pipeline/exec/exchange_sink_operator.h index 9575df01a2a1f4..ed8df4dbe01f77 100644 --- a/be/src/pipeline/exec/exchange_sink_operator.h +++ b/be/src/pipeline/exec/exchange_sink_operator.h @@ -57,8 +57,6 @@ class ExchangeSinkOperator final : public DataSinkOperator> _sink_buffer; int _dest_node_id = -1; diff --git a/be/src/pipeline/exec/multi_cast_data_stream_sink.h b/be/src/pipeline/exec/multi_cast_data_stream_sink.h index dc96506d665a4c..c0e4edd3e304d2 100644 --- a/be/src/pipeline/exec/multi_cast_data_stream_sink.h +++ b/be/src/pipeline/exec/multi_cast_data_stream_sink.h @@ -38,7 +38,7 @@ class MultiCastDataStreamSinkOperator final MultiCastDataStreamSinkOperator(OperatorBuilderBase* operator_builder, DataSink* sink) : DataSinkOperator(operator_builder, sink) {} - bool can_write() override { return true; } + bool can_write() override { return _sink->can_write(); } }; class MultiCastDataStreamSinkOperatorX; diff --git a/be/src/util/proto_util.h b/be/src/util/proto_util.h index b11180ab290b4e..2b8b524da543b2 100644 --- a/be/src/util/proto_util.h +++ b/be/src/util/proto_util.h @@ -45,9 +45,7 @@ Status request_embed_attachment_contain_block(Params* brpc_request, Closure* clo return st; } -inline bool enable_http_send_block( - const PTransmitDataParams& request, - bool transfer_large_data_by_brpc = config::transfer_large_data_by_brpc) { +inline bool enable_http_send_block(const PTransmitDataParams& request) { if (!config::transfer_large_data_by_brpc) { return false; } diff --git a/be/src/vec/sink/vdata_stream_sender.cpp b/be/src/vec/sink/vdata_stream_sender.cpp index 3bce57eda982be..4f9816db0b47d3 100644 --- a/be/src/vec/sink/vdata_stream_sender.cpp +++ b/be/src/vec/sink/vdata_stream_sender.cpp @@ -207,7 +207,7 @@ Status Channel::send_remote_block(PBlock* block, bool eos, Status exec_s { SCOPED_SWITCH_THREAD_MEM_TRACKER_LIMITER(ExecEnv::GetInstance()->orphan_mem_tracker()); - if (enable_http_send_block(_brpc_request, config::transfer_large_data_by_brpc)) { + if (enable_http_send_block(_brpc_request)) { RETURN_IF_ERROR(transmit_block_http(_state->exec_env(), _closure, _brpc_request, _brpc_dest_addr)); } else {