Versions Compared

Key

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

...

  1. Client sends MT ("minitransaction") to master
    • predicates: list of (table id, oid, version)
      • If the transaction commits, the object must have the given version at the time the decision is made. If the object has some other operation applied to it below, it must additionally not be modified until the operation is applied.
    • writes: list of (table id, oid, data, indexes)
      • If the transaction commits, the data and index entries will be stored in the object.
    • creates (with server-assigned keys): list of (table, data, indexes)
      • If the transaction commits, the data and index entries will be stored in a new object.
        • How will the client get to know which object this is? Either the master will have to delay returning the outcome to the client or the participant will have to allocate the ID before the decision to commit is made.
    • deletes: list of (table id, oid)
      • If the transaction commits, the object will be deleted.
    • reads: list of (table id, oid)
      • If the transaction commits, the data and index entries will be returned.
      • Doing reads outside the transaction and then sending a transaction consisting of predicates for the versions that were read is the optimistic alternative to this. Do we want to support pessimistic reads inside transactions?
  2. Master writes transaction object with list of participants, acquiring a txid
  3. Master sends txid, MT to all participants
    • By sending the txid and MT, the master guarantees to send the participants a decision eventually.
  4. Participants lock objects and log MT
  5. Participants send vote to master
    • By casting their voteIf they vote no, they can unlock their objects and forget all about the transaction.
    • If they vote yes, they guarantee to keep their objects locked until they learn the decision.If they vote yes, they guarantee
      and to be able to commit if that is the decision (i.e., they persist the intent of the MT).
  6. Master writes decision in table
  7. Master relays decision to participants
  8. Master sends response to client
  9. Participants commit
  10. Participants sends commit acknowledgement to master
    • By sending their commit acknowledgement, they guarantee to never ask the master about txid again.
  11. Master removes transaction object