Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue 9725][Transaction] - Fix deleteTransactionMarker memory leak #9751

Merged

Conversation

michaeljmarshall
Copy link
Member

@michaeljmarshall michaeljmarshall commented Feb 28, 2021

Fixes (part of) #9725 (not sure if there are other leaks, though)

Motivation

Fixes a memory leak for transactions.

Modifications

The ReadEntryCallback should release the entry passed to it. I validated that other implementations of the ReadEntryCallback class release the entry. Further, the final stack trace referenced in #9725 has clear references to this stack. The only change is to call entry.release(). Because parsing could lead to an exception, I used a finally block.

Verifying this change

This change is a trivial rework / code cleanup without any test coverage. (We must not have test coverage for this type of leak, though.)

Cherry Pick

This PR fixes a memory leak in master (that is also in 2.7.0). We'll want to make sure this makes it into the 2.7.1 release.

@codelipenghui
Copy link
Contributor

@congbobo184 Could you please help review this PR?

@codelipenghui codelipenghui added this to the 2.8.0 milestone Feb 28, 2021
Copy link
Contributor

@congbobo184 congbobo184 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@codelipenghui codelipenghui merged commit fc49ecd into apache:master Mar 1, 2021
codelipenghui pushed a commit that referenced this pull request Mar 1, 2021
Relates to #9725.

Opening this PR because #9751 will (likely) have conflicts for cherry picking. See #9751 for details on the change.
@michaeljmarshall michaeljmarshall deleted the issue-9725-memory-leak branch March 1, 2021 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants