-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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][broker] Fix getPositionAfterN
infinite loop.
#17971
[fix][broker] Fix getPositionAfterN
infinite loop.
#17971
Conversation
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.
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
@@ 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.
|
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
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
currentLedgerId
should be :Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: https://github.com/Technoboy-/pulsar/pull/9