This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-3.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push: new 1e125537fae branch-3.0: [fix](cross join) fix memory usage counter (#46152) (#46341) 1e125537fae is described below commit 1e125537fae16c9d1e2975e10c709cf50d589167 Author: TengJianPing <tengjianp...@selectdb.com> AuthorDate: Sun Jan 5 09:01:39 2025 +0800 branch-3.0: [fix](cross join) fix memory usage counter (#46152) (#46341) --- be/src/pipeline/exec/nested_loop_join_build_operator.cpp | 3 +-- be/src/pipeline/exec/nested_loop_join_build_operator.h | 2 -- be/src/pipeline/exec/nested_loop_join_probe_operator.cpp | 1 + 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/be/src/pipeline/exec/nested_loop_join_build_operator.cpp b/be/src/pipeline/exec/nested_loop_join_build_operator.cpp index 53fa310e69c..c9f7ee7cf5e 100644 --- a/be/src/pipeline/exec/nested_loop_join_build_operator.cpp +++ b/be/src/pipeline/exec/nested_loop_join_build_operator.cpp @@ -127,8 +127,7 @@ Status NestedLoopJoinBuildSinkOperatorX::sink(doris::RuntimeState* state, vector auto mem_usage = block->allocated_bytes(); if (rows != 0) { - local_state._build_rows += rows; - local_state._total_mem_usage += mem_usage; + COUNTER_UPDATE(local_state._memory_used_counter, mem_usage); local_state._shared_state->build_blocks.emplace_back(std::move(*block)); if (_match_all_build || _is_right_semi_anti) { local_state._shared_state->build_side_visited_flags.emplace_back( diff --git a/be/src/pipeline/exec/nested_loop_join_build_operator.h b/be/src/pipeline/exec/nested_loop_join_build_operator.h index 5c41088a705..2648a880a7c 100644 --- a/be/src/pipeline/exec/nested_loop_join_build_operator.h +++ b/be/src/pipeline/exec/nested_loop_join_build_operator.h @@ -49,8 +49,6 @@ public: private: friend class NestedLoopJoinBuildSinkOperatorX; - uint64_t _build_rows = 0; - uint64_t _total_mem_usage = 0; vectorized::VExprContextSPtrs _filter_src_expr_ctxs; }; diff --git a/be/src/pipeline/exec/nested_loop_join_probe_operator.cpp b/be/src/pipeline/exec/nested_loop_join_probe_operator.cpp index bf806196350..4951ba66616 100644 --- a/be/src/pipeline/exec/nested_loop_join_probe_operator.cpp +++ b/be/src/pipeline/exec/nested_loop_join_probe_operator.cpp @@ -475,6 +475,7 @@ Status NestedLoopJoinProbeOperatorX::push(doris::RuntimeState* state, vectorized bool eos) const { auto& local_state = get_local_state(state); COUNTER_UPDATE(local_state._probe_rows_counter, block->rows()); + COUNTER_SET(local_state._memory_used_counter, (int64_t)block->allocated_bytes()); local_state._cur_probe_row_visited_flags.resize(block->rows()); std::fill(local_state._cur_probe_row_visited_flags.begin(), local_state._cur_probe_row_visited_flags.end(), 0); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org