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 8e6b9b4026 [fix](sink) Fix NodeChannel add_block_closure null pointer
(#21534)
8e6b9b4026 is described below
commit 8e6b9b40261c0b214440657f11ed5dbd3a684fbb
Author: Xinyi Zou <[email protected]>
AuthorDate: Thu Jul 6 17:09:43 2023 +0800
[fix](sink) Fix NodeChannel add_block_closure null pointer (#21534)
NodeChannel add_block_closure null pointer when canceled before open_wait
new closure.
---
be/src/vec/sink/vtablet_sink.cpp | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/be/src/vec/sink/vtablet_sink.cpp b/be/src/vec/sink/vtablet_sink.cpp
index ca33b75a2d..c54666d6d6 100644
--- a/be/src/vec/sink/vtablet_sink.cpp
+++ b/be/src/vec/sink/vtablet_sink.cpp
@@ -906,8 +906,14 @@ void VNodeChannel::cancel(const std::string& cancel_msg) {
}
bool VNodeChannel::is_rpc_done() const {
- return (_add_batches_finished || (_cancelled &&
!_add_block_closure->is_packet_in_flight())) &&
- open_partition_finished();
+ if (_add_block_closure != nullptr) {
+ return (_add_batches_finished ||
+ (_cancelled && !_add_block_closure->is_packet_in_flight())) &&
+ open_partition_finished();
+ } else {
+ // such as, canceled before open_wait new closure.
+ return (_add_batches_finished || _cancelled) &&
open_partition_finished();
+ }
}
Status VNodeChannel::close_wait(RuntimeState* state) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]