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 e5be7516978 [bug](exchange) Fix core dump if prepare failed (#28363)
e5be7516978 is described below
commit e5be7516978800cbb6e790b9b958bc81b390d7aa
Author: Gabriel <[email protected]>
AuthorDate: Wed Dec 13 22:59:12 2023 +0800
[bug](exchange) Fix core dump if prepare failed (#28363)
---
be/src/pipeline/exec/exchange_sink_operator.cpp | 6 ++++--
be/src/pipeline/exec/exchange_sink_operator.h | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/be/src/pipeline/exec/exchange_sink_operator.cpp
b/be/src/pipeline/exec/exchange_sink_operator.cpp
index c4319abf03c..be3606433ec 100644
--- a/be/src/pipeline/exec/exchange_sink_operator.cpp
+++ b/be/src/pipeline/exec/exchange_sink_operator.cpp
@@ -83,8 +83,10 @@ bool ExchangeSinkOperator::is_pending_finish() const {
Status ExchangeSinkOperator::close(RuntimeState* state) {
RETURN_IF_ERROR(DataSinkOperator::close(state));
- _sink_buffer->update_profile(_sink->profile());
- _sink_buffer->close();
+ if (_sink_buffer) {
+ _sink_buffer->update_profile(_sink->profile());
+ _sink_buffer->close();
+ }
return Status::OK();
}
diff --git a/be/src/pipeline/exec/exchange_sink_operator.h
b/be/src/pipeline/exec/exchange_sink_operator.h
index 32a61eda334..bc91e5dc19d 100644
--- a/be/src/pipeline/exec/exchange_sink_operator.h
+++ b/be/src/pipeline/exec/exchange_sink_operator.h
@@ -58,7 +58,7 @@ public:
Status close(RuntimeState* state) override;
private:
- std::unique_ptr<ExchangeSinkBuffer<vectorized::VDataStreamSender>>
_sink_buffer;
+ std::unique_ptr<ExchangeSinkBuffer<vectorized::VDataStreamSender>>
_sink_buffer = nullptr;
int _dest_node_id = -1;
RuntimeState* _state = nullptr;
int _mult_cast_id = -1;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]