3.2.8 Distributed Transactions

  1. Java like things
    TransId beginTransaction() throws TransactionException;
    void write(TransId, Object, Value) 
       throws TransactionAbortedException, TransactionException;
    Value read(TransId, Object) 
        throws TransactionAbortedException, TransactionException;
    void commitTransaction(TransId)
       throws TransactionAbortedException, TransactionException;
    void abortTransaction(TransId) throws TransactionException;
    
    Java equivalent may extend Reader and Writer classes to TransactionReader and TransactionWriter, and require transaction ids to be passed in on creation, and for the commit and abort operation. Flashier type systems which ensure commit and abort operations happen are good topics for research.

    Recovery managers and logs

  2. Coordinator crashes before exiting the prepared state. Network partitions one participant from coordinator - the coordinator eventually times out and issues abort.

  3. U Start, U write i, U write j, V write k, V write k, U commit, T write j, V commit, T commit.

    Recovery works by recovery manager redoing operations in order for those transactions that have commited, and undoing any operations that have aborted, depending on particular semantics of rollback - most systems wait till commitment before performing writes, requiring reads within a transaction potentially to read the tentative values.

  4. Total votes = 9. In the answers below, the read quorums can be formed by any set of servers whose votes are greater than the read quorum.
    W = 5, R = > =5
    W = 6, R = > =4
    W = 7, R = > =3
    W = 8, R = > =2
    W = 9, R = > =1
    Writing unavailable when any server is down.

Ian Wakeman 2005-02-22