-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][ml]Still got BK ledger, even though it has been deleted after offloaded #24432
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
[fix][ml]Still got BK ledger, even though it has been deleted after offloaded #24432
Conversation
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
Outdated
Show resolved
Hide resolved
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, good work @poorbarcode
|
/pulsarbot run-failure-checks |
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #24432 +/- ##
============================================
+ Coverage 73.57% 74.27% +0.69%
+ Complexity 32624 32334 -290
============================================
Files 1877 1868 -9
Lines 139502 145397 +5895
Branches 15299 16636 +1337
============================================
+ Hits 102638 107987 +5349
+ Misses 28908 28858 -50
- Partials 7956 8552 +596
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…ffloaded (apache#24432) (cherry picked from commit 73a4ae4) (cherry picked from commit e046212)
…ffloaded (apache#24432) (cherry picked from commit 73a4ae4)
…ffloaded (apache#24432) (cherry picked from commit 73a4ae4) (cherry picked from commit 6b5fdbf)
…ffloaded (apache#24432) (cherry picked from commit 73a4ae4) (cherry picked from commit e046212)
…ffloaded (apache#24432) (cherry picked from commit 73a4ae4) (cherry picked from commit 6b5fdbf)
…ffloaded (apache#24432) (cherry picked from commit 73a4ae4) (cherry picked from commit 6b5fdbf)
Motivation
The reproduction steps of the issue:
4ledgers in the ManagedLedger3ledgers are offloaded.ManagedLedger.getLedgerHandle(long ledgerId)returns BK ledger handles, which have been deletedManagedLedger.getLedgerHandle(long ledgerId)returns Offloader ledger handles.Root cause
Trimming ledgers, BK ledgers are deleted, and
LedgerCacheofManagedLedgerdoes not remove the cached ledger handle in memory.Modifications
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: x