Repository navigation
[fix][test]fix flaky test MLPendingAckStoreTest.testMainProcess - #18310
Merged
liangyepianzhou merged 2 commits intoNov 3, 2022
Merged
Conversation
Technoboy-
approved these changes
Nov 3, 2022
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #18310 +/- ##
============================================
- Coverage 40.04% 39.97% -0.08%
+ Complexity 8625 8615 -10
============================================
Files 687 687
Lines 67436 67440 +4
Branches 7221 7221
============================================
- Hits 27007 26959 -48
- Misses 37411 37457 +46
- Partials 3018 3024 +6
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
codelipenghui
approved these changes
Nov 3, 2022
liangyepianzhou
approved these changes
Nov 3, 2022
1 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 #18230
Motivation
ManagedCursorImplhas a known problem: when thecursor.closeand thecursor.switchLedgerare concurrent executing, a bad version exception is thrown. see:pulsar/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java
Lines 2595 to 2619 in 0c3c175
In this test, it hit this problem:
MlPendingAckStore.clearUselessLogDatawill triggercursor.switchLedgerif it is the first executemard delete.MlPendingAckStore.closewill triggercursor.closeModifications
if
MlPendingAckStore.closefail, just retry, it will be okDocumentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: