forked from apache/pulsar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Issue 10010][Client] fixed memory leak (apache#10028)
trying to close all the resources even if previous one fails during close/shutdown code clean up as per the idea suggestions Fixes apache#10010 ### Motivation Fixed memory leak caused by reception thrown from the PulsarClientImpl constructor in some cases. Resources were not getting closed which used to end up throwing OOM if user code tries to create a client unless succeeded. ### Modifications Handled exception in the constructor with try-catch and updated shutdown method to close all resources correctly. Previously, it was not attempting to close further resource if the previous one failed. Now it will try to close all of them individully. This change is a trivial rework / code cleanup without any test coverage. ### Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): (yes / no): no - The public API: (yes / no): no - The schema: (yes / no / don't know): no - The default values of configurations: (yes / no): no - The wire protocol: (yes / no): no - The rest endpoints: (yes / no): no - The admin cli options: (yes / no): no - Anything that affects deployment: (yes / no / don't know): no ### Documentation - Does this pull request introduce a new feature? (yes / no): no - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented): not applicable - If a feature is not applicable for documentation, explain why?: nothing to concerned with the end-user - If a feature is not documented yet in this PR, please create a followup issue for adding the documentation: not required
- Loading branch information
1 parent
187fb97
commit 197bd93
Showing
5 changed files
with
231 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.