Skip to content
Snippets Groups Projects
Unverified Commit 4e64b7ff authored by Manish R Jain's avatar Manish R Jain Committed by GitHub
Browse files

Simplify Snapshots (#2475)

We had a complicated mechanism to keep track of which transactions have been concluded, and which Raft proposals corresponded to those transactions. This required us to have a txnMark watermark, which kept track of all applied mutations and their Raft indices, which is quite confusing.

Instead, now we just make use of the StartTs stored in proposal.Mutations and the fact that we have a Oracle which already knows the status of transactions. I make use of those givens to remove txnMarks and simplify how we do snapshots.

Further more, I now propose snapshot indices so that the entire Raft group is synchronized on the same snapshot index, calculated by the leader. This also makes it clear that only leader does the snapshot calculation, and the corresponding action of aborting old transactions, with no health signal for some time.

Also, rename MaxPending to MaxAssigned, which is a better term for what the variable holds, i.e. MaxAssigned timestamp by Zero so far.
parent 2e044e1d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment