Re: Zope database connectivity

"Dieter Maurer" <[email protected]>
Newsgroups gmane.comp.web.zope.database
Message-ID <[email protected]>
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.



-- 
Dieter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.