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 24ee3607e14 [Bug](pipeline) nullprt may be close the sink if init
failed (#24926)
24ee3607e14 is described below
commit 24ee3607e143cd2e278a2547acc4b5b2952d4418
Author: HappenLee <[email protected]>
AuthorDate: Wed Sep 27 09:11:06 2023 +0800
[Bug](pipeline) nullprt may be close the sink if init failed (#24926)
---
be/src/vec/sink/async_writer_sink.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/be/src/vec/sink/async_writer_sink.h
b/be/src/vec/sink/async_writer_sink.h
index 5fd03762a55..b0d772a841d 100644
--- a/be/src/vec/sink/async_writer_sink.h
+++ b/be/src/vec/sink/async_writer_sink.h
@@ -90,7 +90,8 @@ public:
bool can_write() override { return _writer->can_write(); }
Status close(RuntimeState* state, Status exec_status) override {
- if (_writer->need_normal_close()) {
+ // if the init failed, the _writer may be nullptr. so here need check
+ if (_writer && _writer->need_normal_close()) {
if (exec_status.ok() && !state->is_cancelled()) {
RETURN_IF_ERROR(_writer->commit_trans());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]