[ZODB-Dev] ZODB _v_ attributes are tricky

Neil Schemenauer nas at mems-exchange.org
Wed Mar 31 13:20:28 EST 2004


We just discovered that it is easy it is to end up with
inconsistencies when using _v_ attributes.  Perhaps it's common
knowledge but it surprised us.  The key point is that _v_ attributes
that become invalid in one connection are not necessarily
invalidated in other connections.  It's obvious when you think about
it.  They have no OID themselves and so ZODB has no way of "talking"
about them.

If the _v_ attribute only depends on the non-persistent attributes
of the object it is attached to then I think you are safe.  However,
I'm not sure if ZODB does the right thing on abort.  Are the _v_
attributes on dirty objects dropped?

  Neil



More information about the ZODB-Dev mailing list