[fix][broker] Fix getPositionAfterN infinite loop. - #17971
Conversation
codelipenghui
left a comment
There was a problem hiding this comment.
Great catch!
Is it able to add an unit test?
We already have the test |
@Technoboy- So why did the test get passed before? I think the test can't cover the case that introduces the infinite loop? |
Ah, yes, right. Sorry for this. I have added the test. |
getPositionAfterN infinite loop.getPositionAfterN infinite loop.
|
@Technoboy- Please check the failed test |
03ef4e9 to
9a44a73
Compare
Yes, I have fixed by #17993 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #17971 +/- ##
=============================================
+ Coverage 34.91% 45.78% +10.87%
- Complexity 5707 17561 +11854
=============================================
Files 607 1573 +966
Lines 53396 128213 +74817
Branches 5712 14100 +8388
=============================================
+ Hits 18644 58708 +40064
- Misses 32119 63406 +31287
- Partials 2633 6099 +3466
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
84f4711 to
bac6889
Compare
(cherry picked from commit c732852)
(cherry picked from commit c732852)
(cherry picked from commit c732852)
Fixes #17967
Master Issue: #17967
Motivation
The root cause is here(line-3365) :
pulsar/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
Lines 3364 to 3366 in 08f5766
The
currentLedgerIdshould be :Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: https://github.com/Technoboy-/pulsar/pull/9