[Zope-dev] Multithread transaction problems in ZODB

Paul Everitt paul@zope.com
Wed, 26 Sep 2001 06:29:31 -0400


First, just a friendly reminder that there is a zodb-dev mailing list. 
On this, check out Andrew Kuchling's page about ZEO development:

   http://www.amk.ca/zodb/zodb-zeo.html

There's a section at the bottom with a brief discussion of 
ConflictError, what it means, and how to handle it.  Zope automatically 
does the retry, but Python develops have to handle it themselves.

Here's a link with some information about what's known as application 
level conflict resolution:

  http://www.zope.org/Members/jim/ZODB/ApplicationLevelConflictResolution

There's also some discussion at:

   http://www.zope.org/Documentation/Articles/ZODB2

Hope this helps...

--Paul

Cyril Elkaim wrote:

>     Hi,
> 
>   We are testing ZODB directly from Python and have a multitread 
> ConflictError problem.
> 
>   In short :-) if we open a connection in a first thread, then a second 
> connection in a second thread and then commit the first one and then the 
> second (the transactions are so interlaced)...
> 
>   Not only we have the ConflicError, even if obviously we do not modify 
> or create the same objects. But in fact the last transaction doesn't 
> even have its own objects saved.
> 
>   We are using ZODB from Zope 2.4. We have a similar problem using 
> Berkeley Storage too (beta4).
> 
>   If the two threads are serialized eveything works fine (but that's no 
> more multithreading no? ;-)
> 
>   So is it possible to access ZODB from a multithreaded application?
> 
> 
>     Thanks in advance
> 
>     Cyril Elkaim
> 
> 
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope )