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

[Functions] Close InputStreams properly #9568

Merged
merged 1 commit into from
Feb 12, 2021

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented Feb 11, 2021

Motivation

InputStreams should always be closed properly. There were a few locations related to function
upload/download where streams weren't closed. This PR also fixes other locations which showed up to not close InputStreams properly.

Modifications

try-with-resources block is used to handle an InputStream

@lhotari
Copy link
Member Author

lhotari commented Feb 11, 2021

/pulsarbot run-failure-checks

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

Lgtm

@sijie sijie added this to the 2.8.0 milestone Feb 12, 2021
@sijie
Copy link
Member

sijie commented Feb 12, 2021

@zymap Can you review this?

@lhotari
Copy link
Member Author

lhotari commented Feb 12, 2021

/pulsarbot run-failure-checks

@lhotari lhotari force-pushed the lh-close-streams-in-function-downloads branch from 8a5c3e9 to fed1b30 Compare February 12, 2021 04:34
@lhotari lhotari requested a review from sijie February 12, 2021 04:37
@lhotari
Copy link
Member Author

lhotari commented Feb 12, 2021

I found a few more InputStream leaks. I was focusing on Pulsar Functions upload/download related streams, but I happened to find a few others when I did a quick search.

@sijie sijie merged commit 547ab3b into apache:master Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants