next up previous
Next: Reflection on a Legacy Up: Split/Join Transaction Model Previous: Split/Join Transaction Model

synthesizing the extended functionality of split and join

When a transaction T1 splits, by executing the transaction control operation split(T2), it must first create a new transaction (T2) and then delegate responsibility for executing some of its operations to this new transaction. To be more precise, T1transfers to T2 responsibility for all uncommitted operations on a particular set of data objects, referred to as the DelegateSet. In practice, users define the DelegateSet by selecting the objects to split from the re-structured transaction. At the time of the split, a new transaction is created, instantiated, and then operations invoked on objects in the DelegateSet by T1 are delegated to T2. The transactions T1 and T2 can then commit or abort independently. The following code segment illustrates how the split transaction control operation is synthesized using commands in the meta interface:


  
Figure 6: Split transaction control operation.

   split(NewTran, DelegateSet){
     // instantiate new transaction.
     instantiate(NewTran);
     // add split/join transaction interface through reflection.
     reflect(NewTran, SplitJoin);
     // delegate locks related to objects in delegate set.
     delegate_lock(NewTran, DelegateSet);
     // delegate ops related to objects in delegate set.
     delegate_op(NewTran, DelegateSet);
     // initiate execution of the newly created transaction.
     begin(NewTran);
     // return execution control to base-level transaction
     return;
   } 


The join transaction operation is the inverse of a split transaction operation. When transaction T1 executes the transaction management operation join(T2), it must delegate its uncommitted operations and associated locks to T2 and then terminate its execution; Transaction T2 must already exist and be instantiated. Transaction T2 is now responsible for committing or aborting these operations, and the updates of T2 must be committed together with the effects of T1. In joining a Transaction, the DelegateSet is simply all uncommitted operations and associated locks. We synthesize the join operation as follows:


  
Figure 7: Join transaction control operation.

   join(DestTran, DelegateSet){
     // delegate locks related to objects in DelegateSet.
     delegate_lock(DestTran, DelegateSet);
     // delegate operations related to objects in DelegateSet
     delegate_op(DestTran, DelegateSet);
     // terminate execution of T1.
     commit(self);
     // return control to invoking transaction.
     return;
   }


Once the extended functionality of the split and join transaction control operations have been defined using the meta interface, the can then be added to the extended transaction interface where they will be available for applications to use.


next up previous
Next: Reflection on a Legacy Up: Split/Join Transaction Model Previous: Split/Join Transaction Model
Matt Hurlbut
1998-07-06