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

Simplify txn commits and aborts (#2491)

Txn:

- Commits have been separated into CommitToMemory and CommitToDisk. This logic is a lot simpler and clearer than before. In particular, CommitToDisk does not try to generate any state. It just serializes the posting list stored at startTs and pushes that to Badger.
- Multiple txns doing CommitToDisk can now be batched up into fewer transactions and use callbacks to execute quickly. Added a helper struct for that.
- Remove the concept of activeTxns in posting/list.go. It's a repetition.
- Simplify txn.deltas, and removed as much as I could.
- Removed abortMutation methods from txn (mvcc.go) and posting/list.go

Zero:

- TryAbort returns OracleDelta, which can be directly proposed in the group.
- abortOldTransactions uses this to ensure that in case we missed a transaction update, the result of the abort can then be proposed to the group, so group snapshot doesn't get stuck.
parent ea1f5449
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment