[ZODB-Dev] Objects ghostified during a transaction

Dieter Maurer dieter at handshake.de
Wed Nov 24 14:44:21 EST 2004


Florent Guillaume wrote at 2004-11-23 19:45 +0100:
>I'm confronted to a bug in CMF (http://zope.org/Collectors/CMF/198) 
>where a _v_ variable disappears in the middle of a request (and reverts 
>to its class-default of None).
>
>I want to fix this by removing the reliance on _v_ variable, but to 
>write a unit test for it I'd like to be sure of why it happens. Can an 
>object be deactivated *in the middle* of a transaction? As a datapoint, 
>it's quite likely that some partial transactions 
>(get_transaction().commit(1)) occur when the bug appears.

Volatile attributes are used at other places as well -- where
they must not disappear during a transaction.
A prominent example is the "_v_connection" attribute
in Zope's database adapters.

This has been discussed in length on zodb-dev in Dec 2003 in
a thread titled "[Problem] "_v_" variables too volatile"

Since February 7 2004, there is a patch (posted to zodb-dev)
that allows to control when objects are deactivated.
The message was titled "More "cPickleCache.incrgc" control".

-- 
Dieter


More information about the ZODB-Dev mailing list