You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2022/07/03 12:22:33 UTC

[doris] branch master updated: [fix] fix agg_memleak (#10571)

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

morningman 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 aecf6e09a9 [fix] fix agg_memleak (#10571)
aecf6e09a9 is described below

commit aecf6e09a9fd58f6cc7db8419d9e6a69d7cde08b
Author: zy-kkk <zh...@qq.com>
AuthorDate: Sun Jul 3 20:22:26 2022 +0800

    [fix] fix agg_memleak (#10571)
    
    The previous code did not call 'destroy' to release the resource after the' create 'operation,
    resulting in a memory leak. So I added Destroy
---
 be/src/vec/exec/vaggregation_node.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/be/src/vec/exec/vaggregation_node.cpp b/be/src/vec/exec/vaggregation_node.cpp
index 68c48897ec..bbd94134fb 100644
--- a/be/src/vec/exec/vaggregation_node.cpp
+++ b/be/src/vec/exec/vaggregation_node.cpp
@@ -719,6 +719,10 @@ Status AggregationNode::_pre_agg_with_serialized_key(doris::vectorized::Block* i
                             }
                         }
 
+                        for (size_t i = 0; i < rows; ++i) {
+                            _destroy_agg_status(_streaming_pre_places[i]);
+                        }
+
                         if (!mem_reuse) {
                             ColumnsWithTypeAndName columns_with_schema;
                             for (int i = 0; i < key_size; ++i) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org