liangyepianzhou opened a new pull request, #18273:
URL: https://github.com/apache/pulsar/pull/18273

   Master Issue: https://github.com/apache/pulsar/issues/16913
   
   ### Motivation
   
   Implement an abortedTxnProcessor to handle the storage of the aborted 
transaction ID.
   ### Modifications
   The structure overview: 
   
![image](https://user-images.githubusercontent.com/55571188/197683651-6ccb106d-1e71-4841-9da7-2644275a401a.png)
   
   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 `persistentWorker` to handle snapshot persistenting** :
   <img width="1003" alt="image" 
src="https://user-images.githubusercontent.com/55571188/198528131-3cde19bc-2034-4693-a8b1-4d6345e6db36.png";>
   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
       * These two method is used to persist the snapshot segment.
   * deleteSnapshotSegment
       * This method is used to delete the snapshot segment.
   
   * updateIndexMetadataForTheLastSnapshot
       * Using to update index metadata (the latest snapshot).
   
   * clearSnapshotSegmentAndIndexes
       * Delete all segments and then delete the index of this topic.
   
   
   * updateSnapshotIndex
       * Called by the deleteSnapshotSegment and writeSnapshotSegmentAsync. Do 
update the index after writing snapshot segment.
       * Called by recovery as a compensation mechanism for updating the index.
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [x] `doc-not-needed` 
   (Please explain why)
   
   
   ### Matching PR in the forked repository
   
   PR in forked repository: https://github.com/liangyepianzhou/pulsar/pull/7


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to