[Zope-DB] Zope database connectivity

Dieter Maurer dieter at handshake.de
Tue Sep 26 13:08:57 EDT 2006

Maciej Wisniowski wrote at 2006-9-25 20:09 +0200:
>>It uses a private ZODB extension to prevent "_v_" attributes to be lost
>>mid transaction (which can have nasty, partly non deterministic and
>>very difficult to understand effects) and then calls "connect".
>Does this mean that there is a bug in ZODB?

Not strictly speaking in ZODB:

   The "_v_" use for database connections is dangerous (and if you
   want buggy).

   It can lead to nasty, apparently non-deterministic effects.
   You may lose your database connection mid transaction
   and part of what you think is a transaction (i.e. atomical) can be lost.

   There are too ways to fix this problem: do not use "_v_" attributes
   to maintain the database connection or extend the ZODB to
   allow more control over the lifetime of "_v_" attributes.

   In our private copy of Zope, I went the second approach
   as "_v_" attributes are essential for several other things
   (beside database connections) as well that suffer from
   the same deficiency.


More information about the Zope-DB mailing list