You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@impala.apache.org by "Huaisi Xu (Code Review)" <ge...@cloudera.org> on 2016/03/26 00:47:12 UTC

[Impala-CR](cdh5-2.2.0_5.4.x) IMPALA-2711: Fix memory leak in Rand().

Hello Michael Ho, Internal Jenkins,

I'd like you to do a code review.  Please visit

    http://gerrit.cloudera.org:8080/2638

to review the following change.

Change subject: IMPALA-2711: Fix memory leak in Rand().
......................................................................

IMPALA-2711: Fix memory leak in Rand().

MathFunctions::RandPrepare() allocates a 4-bytes seed and
stores it in the FunctionContext's thread local state.
However, it was never freed. This change fixes the problem
by adding a close function for Rand() so it has a chance to
free the seed. A new test is also added to verify the fix.

Change-Id: Ibcc2e1ca0d052b86defe80aad471f9fdaac5a453
Reviewed-on: http://gerrit.cloudera.org:8080/1855
Reviewed-by: Michael Ho <kw...@cloudera.com>
Tested-by: Internal Jenkins
(cherry picked from commit 2c637b21bbcd76aa49560e0fce4411fdc5f86be9)
---
M be/src/exprs/math-functions.cc
M be/src/exprs/math-functions.h
M common/function-registry/impala_functions.py
M testdata/workloads/functional-query/queries/QueryTest/create.test
4 files changed, 29 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/38/2638/1
-- 
To view, visit http://gerrit.cloudera.org:8080/2638
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibcc2e1ca0d052b86defe80aad471f9fdaac5a453
Gerrit-PatchSet: 1
Gerrit-Project: Impala
Gerrit-Branch: cdh5-2.2.0_5.4.x
Gerrit-Owner: Huaisi Xu <hx...@cloudera.com>
Gerrit-Reviewer: Internal Jenkins
Gerrit-Reviewer: Michael Ho <kw...@cloudera.com>