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 84d6938a73 [Bug](pipeline) Fix BE crash caused by pipeline (#15890) 84d6938a73 is described below commit 84d6938a7392738363f6023d2296c5adc65fd8a0 Author: Gabriel <gabrielleeb...@gmail.com> AuthorDate: Sat Jan 14 18:37:19 2023 +0800 [Bug](pipeline) Fix BE crash caused by pipeline (#15890) * [Bug](pipeline) Fix BE crash caused by pipeline * update --- be/src/pipeline/exec/exchange_sink_buffer.cpp | 6 ++++-- be/src/pipeline/exec/exchange_sink_buffer.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/be/src/pipeline/exec/exchange_sink_buffer.cpp b/be/src/pipeline/exec/exchange_sink_buffer.cpp index 9f6fbdf891..aedeeec19b 100644 --- a/be/src/pipeline/exec/exchange_sink_buffer.cpp +++ b/be/src/pipeline/exec/exchange_sink_buffer.cpp @@ -89,8 +89,10 @@ void ExchangeSinkBuffer::close() { if (pair.second) { pair.second->release_finst_id(); pair.second->release_query_id(); + delete pair.second; } } + _instance_to_request.clear(); } bool ExchangeSinkBuffer::can_write() const { @@ -168,7 +170,7 @@ Status ExchangeSinkBuffer::_send_rpc(InstanceLoId id) { _construct_request(id); } - auto& brpc_request = _instance_to_request[id]; + auto brpc_request = _instance_to_request[id]; brpc_request->set_eos(request.eos); brpc_request->set_packet_seq(_instance_to_seq[id]++); if (request.block) { @@ -210,7 +212,7 @@ Status ExchangeSinkBuffer::_send_rpc(InstanceLoId id) { } void ExchangeSinkBuffer::_construct_request(InstanceLoId id) { - _instance_to_request[id] = std::make_unique<PTransmitDataParams>(); + _instance_to_request[id] = new PTransmitDataParams(); _instance_to_request[id]->set_allocated_finst_id(&_instance_to_finst_id[id]); _instance_to_request[id]->set_allocated_query_id(&_query_id); diff --git a/be/src/pipeline/exec/exchange_sink_buffer.h b/be/src/pipeline/exec/exchange_sink_buffer.h index 95e2bdfbcb..eff77c05bb 100644 --- a/be/src/pipeline/exec/exchange_sink_buffer.h +++ b/be/src/pipeline/exec/exchange_sink_buffer.h @@ -62,7 +62,7 @@ private: using PackageSeq = int64_t; // must init zero phmap::flat_hash_map<InstanceLoId, PackageSeq> _instance_to_seq; - phmap::flat_hash_map<InstanceLoId, std::unique_ptr<PTransmitDataParams>> _instance_to_request; + phmap::flat_hash_map<InstanceLoId, PTransmitDataParams*> _instance_to_request; phmap::flat_hash_map<InstanceLoId, PUniqueId> _instance_to_finst_id; phmap::flat_hash_map<InstanceLoId, bool> _instance_to_sending_by_pipeline; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org