Links for 2013-10-14

  • The trouble with timestamps

    Timestamps, as implemented in Riak, Cassandra, et al, are fundamentally unsafe ordering constructs. In order to guarantee consistency you, the user, must ensure locally monotonic and, to some extent, globally monotonic clocks. This is a hard problem, and NTP does not solve it for you. When wall clocks are not properly coupled to the operations in the system, causal constraints can be violated. To ensure safety properties hold all the time, rather than probabilistically, you need logical clocks.

    (tags: clocks time distributed databases distcomp ntp via:fanf aphyr vector-clocks last-write-wins lww cassandra riak)

This entry was posted in Uncategorized. Bookmark the permalink. Both comments and trackbacks are currently closed.


  1. Posted October 15, 2013 at 07:34 | Permalink

    This is kind of old news – and probably the reason why databases like Oracle have cluster-global counters that increase monotonically (Oracle calls it “SCN”). Nice catch, though :)

  2. Posted October 15, 2013 at 09:55 | Permalink

    Yes, it is kind of old news — sorry ;) It’s a good roundup of why Last-Write-Wins as implemented in Riak and Cassandra is problematic, in particular, though.