You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "zhangqianqiong (Code Review)" <ge...@cloudera.org> on 2023/07/10 12:25:47 UTC
[Impala-ASF-CR] IMPALA-12274 Fix memory leak because of the local reference catalog was not released
zhangqianqiong has uploaded this change for review. ( http://gerrit.cloudera.org:8080/20175
Change subject: IMPALA-12274 Fix memory leak because of the local reference catalog was not released
......................................................................
IMPALA-12274 Fix memory leak because of the local reference catalog was not released
In the constructor of the catalog class, after converting the catalog
object created by NewObject to a global reference, the local reference
was forgotten to be released, resulting in a minor memory leak.
The solution is to use JniLocalFrame to automatically manage the local reference,
ensuring proper memory management.
Testing: manually test
Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
---
M be/src/catalog/catalog.cc
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/75/20175/1
--
To view, visit http://gerrit.cloudera.org:8080/20175
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
Gerrit-Change-Number: 20175
Gerrit-PatchSet: 1
Gerrit-Owner: zhangqianqiong <qq...@gmail.com>
[Impala-ASF-CR] IMPALA-12274 Fix memory leak because of the local reference catalog was not released
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20175 )
Change subject: IMPALA-12274 Fix memory leak because of the local reference catalog was not released
......................................................................
Patch Set 2:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/13531/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/20175
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
Gerrit-Change-Number: 20175
Gerrit-PatchSet: 2
Gerrit-Owner: zhangqianqiong <qq...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: zhangqianqiong <qq...@gmail.com>
Gerrit-Comment-Date: Wed, 12 Jul 2023 23:02:52 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-12274: Fix memory leak from unreleased local reference
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/20175 )
Change subject: IMPALA-12274: Fix memory leak from unreleased local reference
......................................................................
Patch Set 7: Code-Review+1
--
To view, visit http://gerrit.cloudera.org:8080/20175
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
Gerrit-Change-Number: 20175
Gerrit-PatchSet: 7
Gerrit-Owner: zhangqianqiong <qq...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: zhangqianqiong <qq...@gmail.com>
Gerrit-Comment-Date: Mon, 21 Aug 2023 16:36:45 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-12274 Fix memory leak because of the local reference catalog was not released
Posted by "zhangqianqiong (Code Review)" <ge...@cloudera.org>.
zhangqianqiong has uploaded a new patch set (#2). ( http://gerrit.cloudera.org:8080/20175 )
Change subject: IMPALA-12274 Fix memory leak because of the local reference catalog was not released
......................................................................
IMPALA-12274 Fix memory leak because of the local reference catalog was not released
In the constructor of the catalog class, after converting the catalog
object created by NewObject to a global reference, the local reference
was forgotten to be released, resulting in a minor memory leak.
The solution is to use JniLocalFrame to automatically manage the local
reference, ensuring proper memory management.
Testing: manually test
Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
---
M be/src/catalog/catalog.cc
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/75/20175/2
--
To view, visit http://gerrit.cloudera.org:8080/20175
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
Gerrit-Change-Number: 20175
Gerrit-PatchSet: 2
Gerrit-Owner: zhangqianqiong <qq...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: zhangqianqiong <qq...@gmail.com>
[Impala-ASF-CR] IMPALA-12274: Fix memory leak from unreleased local reference
Posted by "zhangqianqiong (Code Review)" <ge...@cloudera.org>.
zhangqianqiong has uploaded a new patch set (#7). ( http://gerrit.cloudera.org:8080/20175 )
Change subject: IMPALA-12274: Fix memory leak from unreleased local reference
......................................................................
IMPALA-12274: Fix memory leak from unreleased local reference
In the constructor of the catalog class, after converting the catalog
object created by NewObject to a global reference, the local reference
was forgotten to be released, resulting in a minor memory leak.
The solution is to use JniLocalFrame to automatically manage the local
reference, ensuring proper memory management.
Testing: manually test
Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
---
M be/src/catalog/catalog.cc
M be/src/catalog/catalog.h
2 files changed, 7 insertions(+), 6 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/75/20175/7
--
To view, visit http://gerrit.cloudera.org:8080/20175
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
Gerrit-Change-Number: 20175
Gerrit-PatchSet: 7
Gerrit-Owner: zhangqianqiong <qq...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: zhangqianqiong <qq...@gmail.com>
[Impala-ASF-CR] IMPALA-12274: Fix memory leak from unreleased local reference
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20175 )
Change subject: IMPALA-12274: Fix memory leak from unreleased local reference
......................................................................
Patch Set 7:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/13786/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/20175
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
Gerrit-Change-Number: 20175
Gerrit-PatchSet: 7
Gerrit-Owner: zhangqianqiong <qq...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: zhangqianqiong <qq...@gmail.com>
Gerrit-Comment-Date: Mon, 21 Aug 2023 03:18:21 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-12274: Fix memory leak from unreleased local reference
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20175 )
Change subject: IMPALA-12274: Fix memory leak from unreleased local reference
......................................................................
Patch Set 8: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/20175
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
Gerrit-Change-Number: 20175
Gerrit-PatchSet: 8
Gerrit-Owner: zhangqianqiong <qq...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: zhangqianqiong <qq...@gmail.com>
Gerrit-Comment-Date: Wed, 23 Aug 2023 07:40:11 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-12274: Fix memory leak from unreleased local reference
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20175 )
Change subject: IMPALA-12274: Fix memory leak from unreleased local reference
......................................................................
Patch Set 8: Verified+1
--
To view, visit http://gerrit.cloudera.org:8080/20175
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
Gerrit-Change-Number: 20175
Gerrit-PatchSet: 8
Gerrit-Owner: zhangqianqiong <qq...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: zhangqianqiong <qq...@gmail.com>
Gerrit-Comment-Date: Wed, 23 Aug 2023 11:58:39 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-12274: Fix memory leak from unreleased local reference
Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/20175 )
Change subject: IMPALA-12274: Fix memory leak from unreleased local reference
......................................................................
Patch Set 7: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/20175
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
Gerrit-Change-Number: 20175
Gerrit-PatchSet: 7
Gerrit-Owner: zhangqianqiong <qq...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: zhangqianqiong <qq...@gmail.com>
Gerrit-Comment-Date: Wed, 23 Aug 2023 07:39:25 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-12274 Fix memory leak because of the local reference catalog was not released
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/20175 )
Change subject: IMPALA-12274 Fix memory leak because of the local reference catalog was not released
......................................................................
Patch Set 1:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/20175/1/be/src/catalog/catalog.cc
File be/src/catalog/catalog.cc:
http://gerrit.cloudera.org:8080/#/c/20175/1/be/src/catalog/catalog.cc@76
PS1, Line 76: JniLocalFrame jni_frame;
Maybe we should just use DeleteLocalRef after LocalToGlobalRef?
--
To view, visit http://gerrit.cloudera.org:8080/20175
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
Gerrit-Change-Number: 20175
Gerrit-PatchSet: 1
Gerrit-Owner: zhangqianqiong <qq...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Comment-Date: Tue, 11 Jul 2023 00:07:32 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-12274 Fix memory leak because of the local reference catalog was not released
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20175 )
Change subject: IMPALA-12274 Fix memory leak because of the local reference catalog was not released
......................................................................
Patch Set 1:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/13496/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/20175
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
Gerrit-Change-Number: 20175
Gerrit-PatchSet: 1
Gerrit-Owner: zhangqianqiong <qq...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Mon, 10 Jul 2023 12:49:30 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-12274 Fix memory leak because of the local reference catalog was not released
Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/20175 )
Change subject: IMPALA-12274 Fix memory leak because of the local reference catalog was not released
......................................................................
Patch Set 1:
(1 comment)
It seems a similar patch to https://gerrit.cloudera.org/c/20174/ which also corrects the usage on JniLocalFrame. Can we merge them into one? Also is it possible to add some tests?
http://gerrit.cloudera.org:8080/#/c/20175/1//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/20175/1//COMMIT_MSG@9
PS1, Line 9:
nit: don't need indention and please keep the line width in 72 characters.
--
To view, visit http://gerrit.cloudera.org:8080/20175
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
Gerrit-Change-Number: 20175
Gerrit-PatchSet: 1
Gerrit-Owner: zhangqianqiong <qq...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Comment-Date: Mon, 10 Jul 2023 13:43:28 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-12274 Fix memory leak because of the local reference catalog was not released
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20175 )
Change subject: IMPALA-12274 Fix memory leak because of the local reference catalog was not released
......................................................................
Patch Set 3:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/13544/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/20175
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
Gerrit-Change-Number: 20175
Gerrit-PatchSet: 3
Gerrit-Owner: zhangqianqiong <qq...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: zhangqianqiong <qq...@gmail.com>
Gerrit-Comment-Date: Thu, 13 Jul 2023 23:08:44 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-12274 Fix memory leak because of the local reference catalog was not released
Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/20175 )
Change subject: IMPALA-12274 Fix memory leak because of the local reference catalog was not released
......................................................................
Patch Set 3: Code-Review+1
(2 comments)
http://gerrit.cloudera.org:8080/#/c/20175/1/be/src/catalog/catalog.cc
File be/src/catalog/catalog.cc:
http://gerrit.cloudera.org:8080/#/c/20175/1/be/src/catalog/catalog.cc@75
PS1, Line 75: // Used to release the local reference catalog created by `NewObject`
I think not just 'catalog', the jbyteArray 'cfg_bytes' is also created in this scope:
https://github.com/apache/impala/blob/63c435cac11a623693402a2197efdf3b928bd349/be/src/rpc/jni-thrift-util.h#L47
We can simply said: "Used to release local references promptly"
http://gerrit.cloudera.org:8080/#/c/20175/1/be/src/catalog/catalog.cc@80
PS1, Line 80: catalog_class_
not related to this patch but could you also make this a local variable?
--
To view, visit http://gerrit.cloudera.org:8080/20175
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
Gerrit-Change-Number: 20175
Gerrit-PatchSet: 3
Gerrit-Owner: zhangqianqiong <qq...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: zhangqianqiong <qq...@gmail.com>
Gerrit-Comment-Date: Mon, 14 Aug 2023 07:52:55 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-12274 Fix memory leak because of the local reference catalog was not released
Posted by "zhangqianqiong (Code Review)" <ge...@cloudera.org>.
zhangqianqiong has uploaded a new patch set (#3). ( http://gerrit.cloudera.org:8080/20175 )
Change subject: IMPALA-12274 Fix memory leak because of the local reference catalog was not released
......................................................................
IMPALA-12274 Fix memory leak because of the local reference catalog was not released
In the constructor of the catalog class, after converting the catalog
object created by NewObject to a global reference, the local reference
was forgotten to be released, resulting in a minor memory leak.
The solution is to use JniLocalFrame to automatically manage the local
reference, ensuring proper memory management.
Testing: manually test
Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
---
M be/src/catalog/catalog.cc
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/75/20175/3
--
To view, visit http://gerrit.cloudera.org:8080/20175
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
Gerrit-Change-Number: 20175
Gerrit-PatchSet: 3
Gerrit-Owner: zhangqianqiong <qq...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: zhangqianqiong <qq...@gmail.com>
[Impala-ASF-CR] IMPALA-12274: Fix memory leak from unreleased local reference
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20175 )
Change subject: IMPALA-12274: Fix memory leak from unreleased local reference
......................................................................
Patch Set 8:
Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/9625/ DRY_RUN=false
--
To view, visit http://gerrit.cloudera.org:8080/20175
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
Gerrit-Change-Number: 20175
Gerrit-PatchSet: 8
Gerrit-Owner: zhangqianqiong <qq...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: zhangqianqiong <qq...@gmail.com>
Gerrit-Comment-Date: Wed, 23 Aug 2023 07:40:11 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-12274: Fix memory leak from unreleased local reference
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/20175 )
Change subject: IMPALA-12274: Fix memory leak from unreleased local reference
......................................................................
IMPALA-12274: Fix memory leak from unreleased local reference
In the constructor of the catalog class, after converting the catalog
object created by NewObject to a global reference, the local reference
was forgotten to be released, resulting in a minor memory leak.
The solution is to use JniLocalFrame to automatically manage the local
reference, ensuring proper memory management.
Testing: manually test
Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
Reviewed-on: http://gerrit.cloudera.org:8080/20175
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
M be/src/catalog/catalog.cc
M be/src/catalog/catalog.h
2 files changed, 7 insertions(+), 6 deletions(-)
Approvals:
Impala Public Jenkins: Looks good to me, approved; Verified
--
To view, visit http://gerrit.cloudera.org:8080/20175
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
Gerrit-Change-Number: 20175
Gerrit-PatchSet: 9
Gerrit-Owner: zhangqianqiong <qq...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: zhangqianqiong <qq...@gmail.com>
[Impala-ASF-CR] IMPALA-12274 Fix memory leak because of the local reference catalog was not released
Posted by "zhangqianqiong (Code Review)" <ge...@cloudera.org>.
zhangqianqiong has posted comments on this change. ( http://gerrit.cloudera.org:8080/20175 )
Change subject: IMPALA-12274 Fix memory leak because of the local reference catalog was not released
......................................................................
Patch Set 1:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/20175/1/be/src/catalog/catalog.cc
File be/src/catalog/catalog.cc:
http://gerrit.cloudera.org:8080/#/c/20175/1/be/src/catalog/catalog.cc@75
PS1, Line 75: // Used to release the local reference catalog created by `NewObject`
> I think not just 'catalog', the jbyteArray 'cfg_bytes' is also created in t
You're correct, the `cfg_bytes` has the same error.
http://gerrit.cloudera.org:8080/#/c/20175/1/be/src/catalog/catalog.cc@80
PS1, Line 80: catalog_class_
> not related to this patch but could you also make this a local variable?
Done
--
To view, visit http://gerrit.cloudera.org:8080/20175
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic93ea3270dcba3ad4903aa053cc283d4f700e948
Gerrit-Change-Number: 20175
Gerrit-PatchSet: 1
Gerrit-Owner: zhangqianqiong <qq...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: zhangqianqiong <qq...@gmail.com>
Gerrit-Comment-Date: Wed, 16 Aug 2023 11:13:58 +0000
Gerrit-HasComments: Yes