-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Conversation
CC @liyafan82 or @lidavidm would you mind reviewing? |
In practice this can happen if the thread running this code is interrupted. |
@emkornfield Thank you for working on this. I will take a look two or three days later, when I come back from vocation. |
Good catch, the fix looks good. |
There was a problem hiding this 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()); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Merging. Thanks for the PR. @emkornfield |
Closes apache#10423 from emkornfield/ARROW-12907 Authored-by: Micah Kornfield <emkornfield@gmail.com> Signed-off-by: liyafan82 <fan_li_ya@foxmail.com>
No description provided.