Versions Compared

Key

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

...

  1. A client reserves sequence numbers for RPC ids. It reserves M+1 consecutive ids, where M is the number of objects involved in the current transaction. The lowest seq# is not assigned to any object or RPC and work as placeholder. Other M sequence numbers are assigned to each object.
  2. RPC (1) PREPARE: A client sends prepare messages to all data master servers participating transaction. For understandability, we send a separate RPC request for each object in transaction.
    1. Request msg: <list of <tableId, keyHash, Seq#>, tableId, key, condition, newVal>

      ...

          1. list of <tableId, keyHash, Seq#>: used in case of client disconnection.

      ...

          1. TableId & Key: object operating on.

      ...

          1. Condition: condition for COMMIT-VOTE other than successful locking. RAMCloud RejectRules. This can be NULL.

      ...

          1. newVal: value to be written for “key” on the receipt of “COMMIT”.
        1. Handling:

          ...

              1. Grab a lock for “key” on lock table. Buffer newVal for the key.

          ...

              1. - If the lock was grabbed & condition is satisfied, log LockRecord (lock information. See figure~\ref{fig:lockRecord}) and RpcRecord (linearizability. See figure~\ref{fig:rpcRecord})
                -

          ...

              1.  If grabbed the lock but condition is not satisfied, unlock immediately, and log RpcRecord with the result of “ABORT-VOTE”
                -

          ...

              1.  If we failed to grab the lock, log RpcRecord with the result of “ABORT-VOTE”.

          ...

              1. Sync log with backup.
            1. Response: either “COMMIT-VOTE” or “ABORT-VOTE”.
          1. RPC(3) DECISION: After collecting all votes from data masters, the client broadcast its decision to all cohorts.
            1. Request: <tableId, keyHash, seq# for PREPARE, DECISION>
            2. Handling: if DECISION = COMMIT,

              ...

                  1. If there is a buffered write, log Object (with new value), Tombstone for old Object, and Tombstone for LockRecord atomically.

              ...

                  1. Unlock the object in lock table.

              ...

                  1. Sync log with backup…? Is it safe on master crash?

              ...

                  1. (It is okay to delay sync until we sync a next transaction’s LockRecord. We only need a guarantee that only one LockRecord exists per object.)
                1. Response: Done.
              1. After collecting “Done” from all cohorts, the client acknowledge the lowest seq# reserved, so that ACK# can reach up to the highest seq# used in this transaction.

               

              Discussions & Questions:

              ...