Objects in RAMCloud have version numbers to support atomic operations.

Note that only the latest version of an object is ever used — RAMCloud does not store all previous versions of an object.

  1. We definitely want to guarantee that every distinct blob ever at a particular object ID will have a distinct version number, even across generations. (Ask Ryan for his lock example.)
  2. We probably also want to guarantee that version numbers for a particular object ID monotonically increase over time. This allows us to efficiently compare two version numbers and tell which one is more recent.
  3. We might also want to guarantee that the version number of an object increases by exactly one when it is updated. This allows clients to accurately predict the version numbers that they will write. (Ask Diego for his client-side transactions example.)
  4. Example - Conditional Write)
    1. We can tell an object is NOT modified when its version number is the same.
    2. Once a object with version number V is removed.
    3. When a new object with same key is created, if its version number is bigger than V, we can tell the object is modified. However, if its version number is equal or smaller than V, somebody may  erroneously detect the object is unmodified.

The current code guarantees (1) and (2) in the following way:

--- Below is Obsolete .. --

The current code guarantees (1) and (2) in the following way:

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

As of 2010-02-09, we have not decided whether we want to guarantee (3).