You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2020/02/05 16:43:35 UTC
[impala] 02/03: IMPALA-9174: Emit WARNING when ORC lib leaks memory
This is an automated email from the ASF dual-hosted git repository.
tarmstrong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
commit ec3a3ff5b3130a2ec1e5eac9998333112db1363f
Author: Zoltan Borok-Nagy <bo...@cloudera.com>
AuthorDate: Mon Feb 3 17:32:04 2020 +0100
IMPALA-9174: Emit WARNING when ORC lib leaks memory
Added a check to OrcMemPool to test whether there was leaked memory
by the ORC library. Impala frees these memory anyway, but it's useful
to know if there is a bug in the ORC lib.
Testing:
* I tested manually
* I couldn't add an automated test because currently we are not aware
of such bugs in the lib
Change-Id: I370fb9f68734e0e555bd7224ab0f5440c4947c66
Reviewed-on: http://gerrit.cloudera.org:8080/15153
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
be/src/exec/hdfs-orc-scanner.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/be/src/exec/hdfs-orc-scanner.cc b/be/src/exec/hdfs-orc-scanner.cc
index 333ee8d..b6b23c7 100644
--- a/be/src/exec/hdfs-orc-scanner.cc
+++ b/be/src/exec/hdfs-orc-scanner.cc
@@ -62,6 +62,10 @@ HdfsOrcScanner::OrcMemPool::~OrcMemPool() {
}
void HdfsOrcScanner::OrcMemPool::FreeAll() {
+ if (!chunk_sizes_.empty()) {
+ scanner_->state_->LogError(ErrorMsg(TErrorCode::INTERNAL_ERROR,
+ "Impala had to free memory leaked by ORC library."));
+ }
int64_t total_bytes_released = 0;
for (auto it = chunk_sizes_.begin(); it != chunk_sizes_.end(); ++it) {
std::free(it->first);