Skip to content
Snippets Groups Projects
Commit 104a2773 authored by Peter J. Keleher's avatar Peter J. Keleher
Browse files

auto

parent bec0f938
No related branches found
No related tags found
No related merge requests found
......@@ -110,17 +110,20 @@ external consistency known as “linearizability.”
- "in a non-distributed database, serializability implies linearizability"
- single clock
- if T2 starts after T1 finishes, that will be equiv serial order, and so...
![blah](cockroachUnsync.png)
- "CockroachDB’s external consistency guarantee is by default only
serializability, though with some features that can help bridge the gap in
practice."
The anomaly of "causal reverse":
![blah](cockroachUnsync.png)
TrueTime gives clocks skew upper bound of 7ms (as opposed to 100-250ms).
"Before a node is allowed to report that a transaction has committed, it must
wait 7ms. Because all clocks in the system are within 7ms of each other,
wait 7ms. **Because all clocks in the system are within 7ms of each other,
waiting 7ms means that no subsequent transaction may commit at an earlier
timestamp, even if the earlier transaction was committed on a node with a
clock which was fast by the maximum 7ms"
timestamp**, even if the earlier transaction was committed on a node with a
clock which was fast by the maximum 7ms."
Approach:
- "The possibility of reordering commit timestamps for causally related
......@@ -129,17 +132,19 @@ Approach:
- "What *could* happen is that examining the database at a historical timestamp
might yield paradoxical situations where transaction A is not yet visible
while transaction B is, even though transaction A is known to have preceded
B, as they’re causally related. However, this can only happen if there’s no
overlap between the keys read or written during the transactions."
B, as they’re causally related. However, **this can only happen if**:
- there’s no overlap between the keys read or written during the transactions.
- there’s an external low-latency communication channel between clients that
could potentially impact activity on the DBMS.
## Approach
**causality token** - max timestamp encountered (anywhere) in a transaction.
- used to ensure that causal chains maintained by serving as minimum commit
timestamp for that transaction.
- doesn't help w/ independent causal chains
**Problem:**
**Another Problem:**
- *Ti* reading data from mult nodes might fail to read already-committed data
**Solution:**
......@@ -158,7 +163,9 @@ Approach:
So:
- spanner always short-waits on writes for short interval (~7ms)
- cockroachdb sometimes long waits on reads (~250ms)
- cockroachdb delay:
- often fast (one or two rounds, maybe 5ms)
- sometimes long waits on reads (~250ms)
- causal reverse still possible (though probably not a problem in practice)
Strict serializability makes all of the guarantees of one-copy serializability
......
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