[ZODB-Dev] Re: [Persistence-sig] "Straw Man" transaction API

Jeremy Hylton jeremy@alum.mit.edu
Fri, 13 Sep 2002 12:14:33 -0400


>>>>> "PJE" == Phillip J Eby <pje@telecommunity.com> writes:

  PJE> In theory - but neither StrawMan nor the ZODB4 interface allows
  PJE> for a "roll back inside the transaction".  The rollback message
  PJE> is an abort of the entire transaction.

  PJE> It seems to me that the "correct" solution is to request a
  PJE> savepoint from the new participant, and then aggregate that
  PJE> savepoint into all the currently-valid savepoints for the
  PJE> transaction.

I'm not sure what rollback inside the transaction is better or
different than abort the transaction.  

Let's assume the following series of events, where Os are objects and
Ps are transaction participants and On is managed by Pn.

   O1 modified
   P1 joins
   O2 modified
   P2 joins
   savepoint 1
   O3 modified
   P3 joins
   savepoint 2
   rollback to 1
   O4 modified
   P4 joins
   commit

In this case, P3 joined the transaction because O3 was modified.  Then
the transaction was rollback to a point before the modification to
O3.  In the end, the transaction never modified O3 and P3 had no
reason to participate.  In that case, it makes sense to me that P3
gets an abort when the rollback occurs.

Jeremy