This is an automated email from the ASF dual-hosted git repository. stigahuang pushed a commit to branch branch-4.1.1 in repository https://gitbox.apache.org/repos/asf/impala.git
commit a8f953e7f2b73fdc58f7e9384a6b63199066e2cb 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]> Reviewed-on: http://gerrit.cloudera.org:8080/19007 Reviewed-by: Csaba Ringhofer <[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_; }; }
