Everything, Everywhere
Verified Specification | Standardized Formulas | Instant Precision
Secure & Private (Zero Data Retention) Free Access • No Sign-Up

Distributed Transactions: 2PC, 3PC & Percolator Studio

Compare classic Two-Phase Commit coordinator locking against decentralized Google Percolator (TiKV) Snapshot Isolation with primary locks and lazy resolution.

Prewriting
Transaction State
101
Start Timestamp (start_ts)
Pending
Commit Timestamp (commit_ts)
1 Primary, 2 Secondary
Active MVCC Lock Records

Percolator MVCC Column Families (data, lock, write)

Blue = Active Lock | Green = Committed Write Version
Key: "account:A" Primary Key
CFKey @ TSValue
dataaccount:A @ 101$4,500
lockaccount:APrimaryLock (ts=101)
Key: "account:B" Secondary Key
CFKey @ TSValue
dataaccount:B @ 101$5,500
lockaccount:BPtr → account:A
Key: "audit:log_9" Secondary Key
CFKey @ TSValue
dataaudit:log_9 @ 101TxTransferOK
lockaudit:log_9Ptr → account:A

Transaction Execution Event Stream

[TSO] Timestamp Oracle allocated start_ts = 101. Prewrite phase initialized.

Production Percolator / TiKV Code


    
Sponsored Utility
While You're Here
Sponsored Recommendations
Advertisement