When Clocks Disagree
Servers use hybrid logical clocks or wall clocks to timestamp writes, but those clocks drift apart. If skew is unbounded, two writes could be misordered and consistency breaks. Distributed SQL systems assume a maximum clock offset and handle the rest.
The Uncertainty Window
When a transaction reads at timestamp T, any value written within T plus the max offset might actually be in its past on another node. This span is the uncertainty window.
- If a read finds a value inside its uncertainty window, it cannot tell if that value came before or after.
- The transaction performs a read restart, bumping its timestamp above the ambiguous value.
- After the restart the ambiguity is gone and the read proceeds.
Keeping Skew Bounded
Nodes run NTP or better, and the cluster monitors offset. If a node drifts beyond the configured maximum, it removes itself rather than risk serving misordered data.
Key idea
By assuming a bounded clock offset and restarting reads that land in the uncertainty window, distributed SQL preserves correct ordering despite skew, and a node that drifts too far removes itself.