This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new bc434e87edc branch-4.0: [fix](spill) Memory leak in the arena used by 
the aggregation operator #57657 (#57691)
bc434e87edc is described below

commit bc434e87edc35e66f0b6ddb04a6ec4023c3e8b54
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Nov 4 20:55:03 2025 +0800

    branch-4.0: [fix](spill) Memory leak in the arena used by the aggregation 
operator #57657 (#57691)
    
    Cherry-picked from #57657
    
    Co-authored-by: Jerry Hu <[email protected]>
---
 be/src/pipeline/exec/aggregation_sink_operator.cpp             | 1 +
 be/src/pipeline/exec/partitioned_aggregation_sink_operator.cpp | 1 +
 2 files changed, 2 insertions(+)

diff --git a/be/src/pipeline/exec/aggregation_sink_operator.cpp 
b/be/src/pipeline/exec/aggregation_sink_operator.cpp
index 80a77e7c1b2..f666a4122c0 100644
--- a/be/src/pipeline/exec/aggregation_sink_operator.cpp
+++ b/be/src/pipeline/exec/aggregation_sink_operator.cpp
@@ -909,6 +909,7 @@ Status AggSinkOperatorX::reset_hash_table(RuntimeState* 
state) {
     auto& ss = *local_state.Base::_shared_state;
     RETURN_IF_ERROR(ss.reset_hash_table());
     local_state._serialize_key_arena_memory_usage->set((int64_t)0);
+    local_state._agg_arena_pool.clear(true);
     return Status::OK();
 }
 
diff --git a/be/src/pipeline/exec/partitioned_aggregation_sink_operator.cpp 
b/be/src/pipeline/exec/partitioned_aggregation_sink_operator.cpp
index 3ec801bb744..4c6e108a871 100644
--- a/be/src/pipeline/exec/partitioned_aggregation_sink_operator.cpp
+++ b/be/src/pipeline/exec/partitioned_aggregation_sink_operator.cpp
@@ -105,6 +105,7 @@ void 
PartitionedAggSinkLocalState::update_profile(RuntimeProfile* child_profile)
     UPDATE_PROFILE("HashTableComputeTime");
     UPDATE_PROFILE("HashTableEmplaceTime");
     UPDATE_PROFILE("HashTableInputCount");
+    UPDATE_PROFILE("HashTableSize");
     UPDATE_PROFILE("MemoryUsageContainer");
     UPDATE_PROFILE("MemoryUsageArena");
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to