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 e67d07ff4440d8a9e9d5fb9a7682ef678afb4a65 Author: Gabriel <gabrielleeb...@gmail.com> AuthorDate: Wed Dec 21 15:36:22 2022 +0800 [Bug](runtimefilter) Fix BE crash due to init failure (#15228) --- be/src/vec/exec/scan/vscan_node.cpp | 8 ++++---- be/src/vec/exec/scan/vscan_node.h | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/be/src/vec/exec/scan/vscan_node.cpp b/be/src/vec/exec/scan/vscan_node.cpp index fb3ee2c525..cbd3a9e592 100644 --- a/be/src/vec/exec/scan/vscan_node.cpp +++ b/be/src/vec/exec/scan/vscan_node.cpp @@ -186,8 +186,8 @@ Status VScanNode::_start_scanners(const std::list<VScanner*>& scanners) { Status VScanNode::_register_runtime_filter() { int filter_size = _runtime_filter_descs.size(); - _runtime_filter_ctxs.resize(filter_size); - _runtime_filter_ready_flag.resize(filter_size); + _runtime_filter_ctxs.reserve(filter_size); + _runtime_filter_ready_flag.reserve(filter_size); for (int i = 0; i < filter_size; ++i) { IRuntimeFilter* runtime_filter = nullptr; const auto& filter_desc = _runtime_filter_descs[i]; @@ -195,8 +195,8 @@ Status VScanNode::_register_runtime_filter() { RuntimeFilterRole::CONSUMER, filter_desc, _state->query_options(), id())); RETURN_IF_ERROR(_state->runtime_filter_mgr()->get_consume_filter(filter_desc.filter_id, &runtime_filter)); - _runtime_filter_ctxs[i].runtime_filter = runtime_filter; - _runtime_filter_ready_flag[i] = false; + _runtime_filter_ctxs.emplace_back(runtime_filter); + _runtime_filter_ready_flag.emplace_back(false); } return Status::OK(); } diff --git a/be/src/vec/exec/scan/vscan_node.h b/be/src/vec/exec/scan/vscan_node.h index c5b58b3d36..8abd4b5e19 100644 --- a/be/src/vec/exec/scan/vscan_node.h +++ b/be/src/vec/exec/scan/vscan_node.h @@ -172,6 +172,7 @@ protected: // For runtime filters struct RuntimeFilterContext { RuntimeFilterContext() : apply_mark(false), runtime_filter(nullptr) {} + RuntimeFilterContext(IRuntimeFilter* rf) : apply_mark(false), runtime_filter(rf) {} // set to true if this runtime filter is already applied to vconjunct_ctx_ptr bool apply_mark; IRuntimeFilter* runtime_filter; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org