[ZODB-Dev] Problem with handling of data managers that join transactions after savepoints
Jim Fulton
jim at zope.com
Mon May 10 17:27:10 EDT 2010
On Mon, May 10, 2010 at 5:22 PM, Laurence Rowe <l at lrowe.co.uk> wrote:
> On 10 May 2010 21:41, Jim Fulton <jim at zope.com> wrote:
>> A. Change transaction._transaction.AbortSavepoint to remove the
>> datamanager from the transactions resources (joined data managers)
>> when the savepoint is rolled back and abort called on the data
>> manager. Then, if the data manager rejoins, it will have joined
>> only once.
>>
>> Update the documentation of the data manager abort method (in
>> IDataManager) to say that abort is called either when a transaction
>> is aborted or when rolling back to a savepoint created before the
>> data manager joined, and that the data manager is no longer joined
>> to the transaction after abort is called.
>>
>> This is a backward incompatible change to the interface (because it
>> weakens a precondition) that is unlikely to cause harm.
>
>> I plan to implement A soon if there are no objections.
>>
>> Unless someone somehow convinced me to do D, I'll also add an
>> assertion in the Transaction.join method to raise an error if a
>> data manager joins more than once.
>
> Option A sounds sensible. It also means I won't have to change
> anything in the zope.sqlalchemy data manager.
Very cool. I was hoping non-ZODB-data-manager authors
were paying attention. :)
If anyone knows of any other, I would appreciate someone forwarding
this thread to them.
Jim
--
Jim Fulton
More information about the ZODB-Dev
mailing list