This is an automated email from the ASF dual-hosted git repository.
panxiaolei 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 000fc9e2fb7 [Bug](sink) update error status on
BufferControlBlock::close (#40116)
000fc9e2fb7 is described below
commit 000fc9e2fb705648e94b46cd13db66127d7aeaae
Author: Pxl <[email protected]>
AuthorDate: Tue Sep 3 16:25:07 2024 +0800
[Bug](sink) update error status on BufferControlBlock::close (#40116)
## Proposed changes
update error status on BufferControlBlock::close
---
be/src/runtime/buffer_control_block.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/be/src/runtime/buffer_control_block.cpp
b/be/src/runtime/buffer_control_block.cpp
index 6f8022a0034..be03db04d67 100644
--- a/be/src/runtime/buffer_control_block.cpp
+++ b/be/src/runtime/buffer_control_block.cpp
@@ -248,6 +248,11 @@ Status
BufferControlBlock::get_arrow_batch(std::shared_ptr<arrow::RecordBatch>*
Status BufferControlBlock::close(const TUniqueId& id, Status exec_status) {
std::unique_lock<std::mutex> l(_lock);
+ // close will be called multiple times and error status needs to be
collected.
+ if (!exec_status.ok()) {
+ _status = exec_status;
+ }
+
auto it = _result_sink_dependencys.find(id);
if (it != _result_sink_dependencys.end()) {
it->second->set_always_ready();
@@ -258,7 +263,6 @@ Status BufferControlBlock::close(const TUniqueId& id,
Status exec_status) {
}
_is_close = true;
- _status = exec_status;
_arrow_data_arrival.notify_all();
if (!_waiting_rpc.empty()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]