- Wide Area Transactions
- Spanner provides externally consistent reads and writes, as well as globally-consistent reads at a timestamp
Organization
- Universe
- Zone
- Spanserver
- Tablet (data shard)

TrueTime
Method | Returns |
---|
TT.now() | TTinterval: [earliest, latest] |
TT.after(t) | true if t has definitely passed |
TT.before(t) | true if t has definitely not arrived |
Transactions
Read Only Transaction
R/W Transaction
- 2PC + MVCC + Timestamp Ordering + Paxos Groups
- Clients start the txn
- One Paxos leader is selected as txn leader
- txn leader ask all relevant Paxos leaders in all shards to prepare for the commit, thus lock the required resources. (prepare phase)
- Commit wait for TrueTime api
- Commit the txn if success (commit / abort phase)
- How the txn leader is selected?
Links