[feat][txn] implement the SnapshotSegmentAbortedTxnProcessor - #18273
[feat][txn] implement the SnapshotSegmentAbortedTxnProcessor#18273congbobo184 merged 42 commits into
Conversation
poorbarcode
left a comment
There was a problem hiding this comment.
Have not read this PR completely, left some comments
|
The pr had no activity for 30 days, mark with Stale label. |
…hotsegmentAbortedProcessor
In factly, this logic in |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #18273 +/- ##
=============================================
+ Coverage 47.46% 61.04% +13.58%
- Complexity 10727 25813 +15086
=============================================
Files 711 1910 +1199
Lines 69456 138905 +69449
Branches 7452 15241 +7789
=============================================
+ Hits 32964 84798 +51834
- Misses 32810 46331 +13521
- Partials 3682 7776 +4094
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
This PR introduced a new flaky test #19650, please fix |
|
the implementation contains multiple thread-safety issues, I filed #22116 |
Master Issue: #16913
Motivation
Implement an abortedTxnProcessor to handle the storage of the aborted transaction ID.
Modifications
The structure overview:

The main idea is to move the logic of the operation of checking and persistent aborted transaction IDs(take snapshots) and the operation of updating maxReadPosition into the AbortedTxnProcessor.
And the AbortedTxnProcessor can be implemented in different designs.
Add

persistentWorkerto handle snapshot persistenting :The first four items below are the corresponding four tasks in the figure. The fifth item is not strictly a task, but a part of the first two tasks.
takeSnapshotSegmentAsync -> writeSnapshotSegmentAsync
deleteSnapshotSegment
clearSnapshotSegmentAndIndexes
updateSnapshotIndex
takeSnapshotByChangeTimesandtakeSnapshotByTimeout.Documentation
doc-not-needed(Please explain why)
Matching PR in the forked repository
PR in forked repository: liangyepianzhou#9