Skip to content

Instantly share code, notes, and snippets.

@henryr
Created January 27, 2014 19:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henryr/8655574 to your computer and use it in GitHub Desktop.
Save henryr/8655574 to your computer and use it in GitHub Desktop.
External consistency?
The claim for 'external consistency' is as following (all quotes are from the journal paper):
"external-consistency invariant: if the start of a transaction T2 occurs after the commit of a transaction T1, then the commit time-stamp of T2 must be greater than the commit timestamp of T1."
But when assigning a commit timestamp, section 4.2.1 has:
"The commit timestamp s must be greater than or equal to all pre- pare timestamps (to satisfy the constraints discussed in Section 4.1.3), greater than TT.now().latest at the time the coordinator received its commit message, and greater than any timestamps the leader has assigned to previous transactions (again, to pre- serve monotonicity)."
This lead me down the following path:
1. Is TT.now().latest monotonic increasing? Presumably not, otherwise the third requirement (about being larger than any previous transaction) would be implicit, and also epsilon is not monotonic increasing.
2. If it is not monotonic increasing, how is the external consistency guarantee maintained when writing transactions to disjoint participant groups? It's clear from section 4.1.3 that 'all prepare timestamps' in the above quote means only those in the participating groups, so presumably coordinators from disjoint groups can assign timestamps independently. If the coordinator waited for prepare timestamps from all groups, whether participating in the transaction or not, that would enforce external consistency, but that seems a scalability and throughput issue.
3. So does external consistency only apply to transactions that are causally related? (Since they share a participant group, so must have externally consistent ordered timestamps). This would be in contradiction to the claim, although not very damaging: it simply means that only transactions that touch the same data are guaranteed to be externally consistent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment