Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • There's a "master vector clock" per table which contains the next available version number for that table. This is initialized to a small integer when the table is created and is recoverable after crashes (see Recovery).
  • When an object is created or updated, its new version number is set to the value of the master vector clock for that table, and the master vector clock is incremented.
  • Nothing special happens when an object is deleted.

A slightly different implementation could guarantee (1), (2), and (3):

  • Keep the master vector clock, initialize and recover it the same.
  • When an object is created, its new version number is set to the value of the master vector clock for that table, and the master vector clock is incremented.
  • When an object is updated, its new version number is set the old blob's version number plus one.
  • When an object is deleted, set the master vector clock to max(master vector clock, the deleted blob's version number plus one).