You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2023/02/05 04:11:43 UTC
[doris] 01/15: [fix](scan) coredump caused by null of _scanner_ctx (#16361)
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
commit 085fe7e4a9569b07fe5fadc309f32cd9834daa5b
Author: Jerry Hu <mr...@gmail.com>
AuthorDate: Fri Feb 3 09:24:15 2023 +0800
[fix](scan) coredump caused by null of _scanner_ctx (#16361)
---
be/src/vec/exec/scan/vscan_node.cpp | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/be/src/vec/exec/scan/vscan_node.cpp b/be/src/vec/exec/scan/vscan_node.cpp
index 57178d4d92..0d9c049cf7 100644
--- a/be/src/vec/exec/scan/vscan_node.cpp
+++ b/be/src/vec/exec/scan/vscan_node.cpp
@@ -109,8 +109,14 @@ Status VScanNode::get_next(RuntimeState* state, vectorized::Block* block, bool*
SCOPED_TIMER(_get_next_timer);
SCOPED_TIMER(_runtime_profile->total_time_counter());
if (state->is_cancelled()) {
- _scanner_ctx->set_status_on_error(Status::Cancelled("query cancelled"));
- return _scanner_ctx->status();
+ // ISSUE: https://github.com/apache/doris/issues/16360
+ // _scanner_ctx may be null here, see: `VScanNode::alloc_resource` (_eos == null)
+ if (_scanner_ctx) {
+ _scanner_ctx->set_status_on_error(Status::Cancelled("query cancelled"));
+ return _scanner_ctx->status();
+ } else {
+ return Status::Cancelled("query cancelled");
+ }
}
if (_eos) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org