This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push: new 18dc82010b1 branch-2.1: [enhancement](memoryfailed) throw exception instead of log fatal during memory allocate failed #49876 (#49897) 18dc82010b1 is described below commit 18dc82010b1d9bb49296dc0388130f783fbfb4af Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Wed Apr 9 16:03:14 2025 +0800 branch-2.1: [enhancement](memoryfailed) throw exception instead of log fatal during memory allocate failed #49876 (#49897) Cherry-picked from #49876 Co-authored-by: yiguolei <guo...@selectdb.com> --- be/src/vec/aggregate_functions/aggregate_function_sort.h | 6 +++++- be/src/vec/aggregate_functions/aggregate_function_window_funnel.h | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/be/src/vec/aggregate_functions/aggregate_function_sort.h b/be/src/vec/aggregate_functions/aggregate_function_sort.h index 891b48995a9..e1160554956 100644 --- a/be/src/vec/aggregate_functions/aggregate_function_sort.h +++ b/be/src/vec/aggregate_functions/aggregate_function_sort.h @@ -89,7 +89,11 @@ struct AggregateFunctionSortData { PBlock pblock; pblock.ParseFromString(data); auto st = block.deserialize(pblock); - CHECK(st.ok()); + // If memory allocate failed during deserialize, st is not ok, throw exception here to + // stop the query. + if (!st.ok()) { + throw doris::Exception(st); + } } void add(const IColumn** columns, size_t columns_num, size_t row_num) { diff --git a/be/src/vec/aggregate_functions/aggregate_function_window_funnel.h b/be/src/vec/aggregate_functions/aggregate_function_window_funnel.h index 0b6e2cbabcd..46c8ec9b117 100644 --- a/be/src/vec/aggregate_functions/aggregate_function_window_funnel.h +++ b/be/src/vec/aggregate_functions/aggregate_function_window_funnel.h @@ -354,8 +354,10 @@ struct WindowFunnelState { } Block block; auto status = block.deserialize(pblock); + // If memory allocate failed during deserialize, st is not ok, throw exception here to + // stop the query. if (!status.ok()) { - throw doris::Exception(ErrorCode::INTERNAL_ERROR, status.to_string()); + throw doris::Exception(status); } mutable_block = MutableBlock(std::move(block)); _reset_columns_ptr(); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org