This is an automated email from the ASF dual-hosted git repository.
stigahuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
The following commit(s) were added to refs/heads/master by this push:
new f8eac781c IMPALA-11557: Fix memory leak in BlockingRowBatchQueue
f8eac781c is described below
commit f8eac781c17be5492d367b63e85b9e4746e5cc12
Author: hexianqing <[email protected]>
AuthorDate: Fri Sep 9 17:43:10 2022 +0800
IMPALA-11557: Fix memory leak in BlockingRowBatchQueue
'batch_queue_' is a pointer to store the RowBatches. It's
initialized in the constructor but not deleted in the destructor.
The way to fix in the patch is to use std::unique_ptr.
Change-Id: I656316b6575ce74a03b83fcd45e772c763835d56
Reviewed-on: http://gerrit.cloudera.org:8080/18960
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Quanlong Huang <[email protected]>
---
be/src/runtime/blocking-row-batch-queue.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/be/src/runtime/blocking-row-batch-queue.h
b/be/src/runtime/blocking-row-batch-queue.h
index f7fb63c4f..eb80db648 100644
--- a/be/src/runtime/blocking-row-batch-queue.h
+++ b/be/src/runtime/blocking-row-batch-queue.h
@@ -109,6 +109,6 @@ class BlockingRowBatchQueue {
std::list<std::unique_ptr<RowBatch>> cleanup_queue_;
/// BlockingQueue that stores the RowBatches
- BlockingQueue<std::unique_ptr<RowBatch>, RowBatchBytesFn>* batch_queue_;
+ std::unique_ptr<BlockingQueue<std::unique_ptr<RowBatch>, RowBatchBytesFn>>
batch_queue_;
};
}