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 1eabcc3d8b0 [fix](exec_node) crashing caused by cancelled query in
ExecNode (#30192)
1eabcc3d8b0 is described below
commit 1eabcc3d8b09c582057a386c26263a45cf4aaf8b
Author: Jerry Hu <[email protected]>
AuthorDate: Mon Jan 22 15:04:27 2024 +0800
[fix](exec_node) crashing caused by cancelled query in ExecNode (#30192)
---
be/src/exec/exec_node.cpp | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/be/src/exec/exec_node.cpp b/be/src/exec/exec_node.cpp
index 6bc6e07c563..d65e8f96bd2 100644
--- a/be/src/exec/exec_node.cpp
+++ b/be/src/exec/exec_node.cpp
@@ -558,22 +558,22 @@ Status ExecNode::get_next_after_projects(
RuntimeState* state, vectorized::Block* block, bool* eos,
const std::function<Status(RuntimeState*, vectorized::Block*, bool*)>&
func,
bool clear_data) {
- Defer defer([block, this]() {
- if (block && !block->empty()) {
- COUNTER_UPDATE(_output_bytes_counter, block->allocated_bytes());
- COUNTER_UPDATE(_block_count_counter, 1);
- }
- });
if (_output_row_descriptor) {
if (clear_data) {
clear_origin_block();
}
- auto status = func(state, &_origin_block, eos);
- if (UNLIKELY(!status.ok())) return status;
- return do_projections(&_origin_block, block);
+ RETURN_IF_ERROR(func(state, &_origin_block, eos));
+ RETURN_IF_ERROR(do_projections(&_origin_block, block));
+ } else {
+ RETURN_IF_ERROR(func(state, block, eos));
}
_peak_memory_usage_counter->set(_mem_tracker->peak_consumption());
- return func(state, block, eos);
+
+ if (block && !block->empty()) {
+ COUNTER_UPDATE(_output_bytes_counter, block->allocated_bytes());
+ COUNTER_UPDATE(_block_count_counter, 1);
+ }
+ return Status::OK();
}
Status ExecNode::sink(RuntimeState* state, vectorized::Block* input_block,
bool eos) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]