[ZODB-Dev] Savepoints are invalidated once they are used

Jim Fulton jim at zope.com
Mon Jul 11 10:31:48 EDT 2005


Tim Peters wrote:
> [Christian Heimes]

...

>>Something else strikes me. Why am I unable to roll back to the same
>>savepoint multiple times?
> 
> 
> Because that's how it works <wink>.  Maybe Jim can explain why quickly --
> offhand I'm not sure.  I don't think it could be guessed from the interface
> docs:
> 
> class InvalidSavepointRollbackError(Exception):
>     """Attempt to rollback an invalid savepoint.
> 
>     A savepoint may be invalid because:
> 
>     - The surrounding transaction has committed or aborted.
> 
>     - An earlier savepoint in the same transaction has been rolled back.
>     """
> 
> The last line there reads like it's OK to roll back to the _same_ savepoint
> multiple times (it's not earlier than itself ...).

Yup

 >  But
> transaction/savepoint.txt explicitly says (and tests that) you can't, so
> it's intended behavior:

Yup, but I think it is incorrect behavior.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the ZODB-Dev mailing list