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

ARROW-12907: [Java] Fix memory leak on deserialization errors #10423

Closed
wants to merge 1 commit into from

Conversation

emkornfield
Copy link
Contributor

No description provided.

@emkornfield
Copy link
Contributor Author

CC @liyafan82 or @lidavidm would you mind reviewing?

@github-actions
Copy link

@emkornfield
Copy link
Contributor Author

In practice this can happen if the thread running this code is interrupted.

@liyafan82
Copy link
Contributor

CC @liyafan82 or @lidavidm would you mind reviewing?

@emkornfield Thank you for working on this. I will take a look two or three days later, when I come back from vocation.

@kiszk
Copy link
Member

kiszk commented May 30, 2021

Good catch, the fix looks good.

Copy link
Member

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

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

LGTM. I'll let Liya Fan take a look as well.

batch.close();

{
ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nice to wrap this into a try-with-resource block.

Copy link
Contributor

@liyafan82 liyafan82 left a comment

Choose a reason for hiding this comment

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

LGTM.

@liyafan82
Copy link
Contributor

Merging. Thanks for the PR. @emkornfield

@liyafan82 liyafan82 closed this in 4abd200 Jun 4, 2021
michalursa pushed a commit to michalursa/arrow that referenced this pull request Jun 13, 2021
Closes apache#10423 from emkornfield/ARROW-12907

Authored-by: Micah Kornfield <emkornfield@gmail.com>
Signed-off-by: liyafan82 <fan_li_ya@foxmail.com>
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.

4 participants