[ZODB-Dev] edge case question about _p_deactiveate and modified objects

Gary Poster gary at zope.com
Fri Mar 24 09:56:06 EST 2006


On Mar 24, 2006, at 9:11 AM, Chris Withers wrote:

> Hi All,
>
> What happens if you call _p_deactivate() on a modified object but  
> before the modifications have been committed?
>
> Do the modifications get lost or will they still be saved when the  
> next commit happens after the _p_deactivate()?

Under normal operation, the _p_deactivate call is ignored on a  
modified object, so the changes are not lost (but _p_deactivate  
accomplished nothing).

However, there is currently a bug that if you call _p_deactivate on a  
new persistent object that has a database connection then the whole  
thing will just be lost.  I have a TODO to make a small test case of  
this and put it in the collector.  AIUI from Jim, fixing this  
reliably will require some API changes.

Gary


More information about the ZODB-Dev mailing list