-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][broker]Fix memory leak when using a customized ManagedLedger implementation #25016
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
Conversation
lhotari
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@poorbarcode Why does this only apply to a custom implementation? |
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
Show resolved
Hide resolved
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:
|
pulsar-broker/src/test/java/org/apache/bookkeeper/mledger/impl/CustomizedManagedLedgerTest.java
Show resolved
Hide resolved
Technoboy-
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to paste the stack for the motivation.
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