cockroachdb/cockroach — pull request #244 by tschottdorf (2014-12-22 10:14:46+00:00)
Title: add -linearizable flag

when the -linearizable flag is set, the coordinator receiving the
EndTransaction request will make a note of the local wall time
before dispatching the request further, reexamining the local
clock and txn commit timestamp when the call completes successfully.

if either MaxOffset ns were spent between those two events, or
the transaction's commit timestamp is MaxOffset behind the
local clock after the EndTransaction call has been carried
out successfully, control is returned to the client immediately.
Otherwise, the smaller of the two durations described above
is waited before returning control.

This ensures that at the point of returning control, all nodes
in the system are ahead of the commit timestamp in the transaction.