-
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 failure while creating non-durable cursor with inactive managed-ledger #21508
Conversation
@rdhabalia Please add the following content to your PR description and select a checkbox:
|
…tive managed-ledger
aef443d
to
1744b2d
Compare
Codecov Report
@@ Coverage Diff @@
## master #21508 +/- ##
=============================================
+ Coverage 33.39% 73.26% +39.86%
- Complexity 12194 32625 +20431
=============================================
Files 1638 1890 +252
Lines 127949 140442 +12493
Branches 13952 15436 +1484
=============================================
+ Hits 42733 102897 +60164
+ Misses 79564 29459 -50105
- Partials 5652 8086 +2434
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.
Looks good
…tive managed-ledger (#21508)
…tive managed-ledger (#21508)
…tive managed-ledger (apache#21508)
…tive managed-ledger (apache#21508)
…tive managed-ledger (apache#21508)
@@ -4476,10 +4476,13 @@ public void checkInactiveLedgerAndRollOver() { | |||
} | |||
|
|||
ledgerClosed(lh); | |||
createLedgerAfterClosed(); |
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.
@rdhabalia @vineeth1995 @lhotari
I removed this line (createLedgerAfterClosed();
), but the test testNonDurableCursorCreateForInactiveLedger
still passes.
I think the root cause of the issue you encountered is the ManagedLedegrImpl.ledgers
is empty due to other bugs. So, I want to revert this PR.
And it's a break change to the
|
Motivation
Right now, the broker is failing to create a reader for a topic that is inactive and has deleted the inactive ledger as it has reached the inactive-ledger-timeout threshold. inactive-ledger-deletion task deletes inactive ledger but it doesn't create a new ledger because of that such topic stays with
LedgerClosed
state and without active ledger, and meanwhile if any reader tries to connect on that topic then reader creation fails with below errorModifications
Make sure, inactive-ledger-timeout task creates a new ledger after deleting inactive ledger to avoid above such failures while creating reader and subscription cursor.
Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: