[fix][broker]Fix memory leak when using a customized ManagedLedger implementation - #25016
Merged
Conversation
Member
@poorbarcode Why does this only apply to a custom implementation? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #25016 +/- ##
=============================================
+ Coverage 38.56% 74.37% +35.81%
- Complexity 13262 33733 +20471
=============================================
Files 1856 1920 +64
Lines 145287 150304 +5017
Branches 16877 17458 +581
=============================================
+ Hits 56025 111790 +55765
+ Misses 81696 29611 -52085
- Partials 7566 8903 +1337
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
codelipenghui
approved these changes
Nov 25, 2025
2 tasks
Technoboy-
approved these changes
Nov 26, 2025
Technoboy-
left a comment
Contributor
There was a problem hiding this comment.
Better to paste the stack for the motivation.
coderzc
approved these changes
Nov 26, 2025
dao-jun
approved these changes
Nov 26, 2025
Technoboy-
pushed a commit
that referenced
this pull request
Nov 27, 2025
ganesh-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Dec 1, 2025
…plementation (apache#25016) (cherry picked from commit 3937788) (cherry picked from commit 7adf72f)
ganesh-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Dec 2, 2025
…plementation (apache#25016) (cherry picked from commit 3937788) (cherry picked from commit 7adf72f)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Issue: if a user used a customized
ManagedLedgerimplementation, which does not extendManagedLedgerImpl, he will encounter a memory leak issue, you can reproduce it by the new testtestNoMemoryLeakWhenExpireMessages#24606 improved the function
message expiration, but forgot to releaseEntryImplhere: https://github.com/apache/pulsar/pull/24606/files#diff-5edf14cc6f25857d0cfdd26b2d3b3141230ecfb0dfa95aebf7583fd76ede4c4bR3918-R3929PersistentTopic.java
Modifications
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: x