Featured Developer Sponsor • Zero-Token Protection
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
| CF | Key @ TS | Value |
|---|---|---|
| data | account:A @ 101 | $4,500 |
| lock | account:A | PrimaryLock (ts=101) |
Key: "account:B"
Secondary Key
| CF | Key @ TS | Value |
|---|---|---|
| data | account:B @ 101 | $5,500 |
| lock | account:B | Ptr → account:A |
Key: "audit:log_9"
Secondary Key
| CF | Key @ TS | Value |
|---|---|---|
| data | audit:log_9 @ 101 | TxTransferOK |
| lock | audit:log_9 | Ptr → 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