[Zope-dev] [Bug] Zope's transaction behaviour flawed

Toby Dickenson tdickenson@geminidataloggers.com
Mon, 3 Feb 2003 17:04:47 +0000


On Sunday 02 February 2003 3:40 pm, Dieter Maurer wrote:
> Zope's current transaction behaviour is essentially:
>
> 1   ## request starts
> 2   transaction.begin()
> 3   try:
> 4        object=3D REQUEST.traverse(...)
> 5        mapply(object,...)
> 6        transaction.commit()
> 7   except:
> 8        transaction.abort()
> 9        handle_error()
> 10  ## request ends
>
>
> This is flawed as error handling is done outside of a transaction.
>
>    Potential changes during the error handling spill over
>    uncontrolled into another request and are there
>    either committed or aborted as part of this request.

A visit to the dentist has given me some time to think about this, and I =
think=20
there is a flaw in this explanation. Surely any changes that leak out fro=
m=20
one request will will be be aborted before they can do any damage, during=
 the=20
call to transaction.begin() on line 2.

The doc string from transaction.begin is:

        '''Begin a new transaction.

        This aborts any transaction in progres.
        '''

(I should have a chance to experiment with this tomorrow)

--=20
Toby Dickenson
http://www.geminidataloggers.com/people/tdickenson