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

[Broker] Fix replicated subscriptions direct memory leak #11396

Merged

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented Jul 20, 2021

Fixes #11383

Motivation

Using replicated subscriptions results in a direct memory leak. See #11383 for more details.

Modifications

.release() wasn't called for marker messages sent by ReplicatedSubscriptionsController. Use writeMarker method to publish marker messages and call release in try-finally block.

@lhotari lhotari added type/bug The PR fixed a bug or issue reported a bug area/broker release/2.8.1 release/2.7.4 labels Jul 20, 2021
@lhotari lhotari added this to the 2.9.0 milestone Jul 20, 2021
@lhotari lhotari requested a review from merlimat July 20, 2021 17:56
@lhotari lhotari self-assigned this Jul 20, 2021
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

@lhotari lhotari closed this Jul 22, 2021
@lhotari lhotari reopened this Jul 22, 2021
@lhotari lhotari added the doc-not-needed Your PR changes do not impact docs label Jul 22, 2021
@lhotari lhotari merged commit 8841c81 into apache:master Jul 22, 2021
lhotari added a commit that referenced this pull request Jul 22, 2021
- .release() wasn't called for marker messages sent by ReplicatedSubscriptionsController.
- Use writeMarker method to publish marker messages and call release in try-finally block.

(cherry picked from commit 8841c81)
@lhotari lhotari added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Jul 22, 2021
lhotari added a commit that referenced this pull request Jul 22, 2021
- .release() wasn't called for marker messages sent by ReplicatedSubscriptionsController.
- Use writeMarker method to publish marker messages and call release in try-finally block.

(cherry picked from commit 8841c81)
@lhotari lhotari added the cherry-picked/branch-2.7 Archived: 2.7 is end of life label Jul 22, 2021
Technoboy- pushed a commit to Technoboy-/pulsar that referenced this pull request Jul 22, 2021
- .release() wasn't called for marker messages sent by ReplicatedSubscriptionsController. 
- Use writeMarker method to publish marker messages and call release in try-finally block.
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
- .release() wasn't called for marker messages sent by ReplicatedSubscriptionsController. 
- Use writeMarker method to publish marker messages and call release in try-finally block.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker cherry-picked/branch-2.7 Archived: 2.7 is end of life cherry-picked/branch-2.8 Archived: 2.8 is end of life doc-not-needed Your PR changes do not impact docs release/2.7.4 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.

[Broker] Direct memory leak when using replicated subscriptions and Key_Shared consumers
5 participants