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

[pulsar-client] clean up MultiTopicsConsumerImpl reference on consumer creation failure #11754

Merged
merged 1 commit into from
Aug 24, 2021

Conversation

rdhabalia
Copy link
Contributor

Motivation

Partitioned-topic Consumer doesn't cleanup the resources when it fails to create consumer, and it creates memory leak if consumer creation is keep failing with non-recoverable error (eg: BusySubscriptionError) which makes application unstable. One of the issue is unAckedMessageTracker timer, which still keeps consumer reference even after closing the timer-task in cleanup method and consume-creation failure introduces memory leak with objects associated with timer-task.

image

Modification

Close and clean timer task references.

@rdhabalia rdhabalia added this to the 2.9.0 milestone Aug 23, 2021
@rdhabalia rdhabalia self-assigned this Aug 23, 2021
@merlimat merlimat added type/bug The PR fixed a bug or issue reported a bug release/2.8.1 labels Aug 24, 2021
@rdhabalia rdhabalia merged commit f154de7 into apache:master Aug 24, 2021
@rdhabalia rdhabalia deleted the multi_leak branch August 24, 2021 02:36
hangc0276 pushed a commit that referenced this pull request Aug 25, 2021
@hangc0276 hangc0276 added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Aug 25, 2021
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/client cherry-picked/branch-2.8 Archived: 2.8 is end of life release/2.8.1 type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants