[branch-2.10][fix][flaky-test] ManagedCursorMetricsTest.testManagedCursorMetrics #17504
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes
Motivation & Modifications
PR #16878 cannot be
cherry-pickedtobranch-2.10, there will be a conflict. so create this new PR.(High light) The logic differs from #16878:
brk_ml_cursor_persistLedgerSucceedis0inbranch-master. But in current PR, it is1"createNewMetadataLedger" triggers once BK writes
branch-2.10, "cursor.initialize" triggers the execution of "createNewMetadataLedger". see [Code in branch-2.10]branch-master, "cursor.initialize" does not triggers the execution of "createNewMetadataLedger". see [Code in branch-master]Code in branch-2.10 (High light line: L651)
pulsar/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java
Lines 643 to 663 in 8409652
Code in branch-master (High light line: L653)
pulsar/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java
Lines 646 to 665 in f453e0a
Documentation
doc-requireddoc-not-neededdocdoc-complete