[Zope-dev] How to avoid ConflictErrors ?

Michel Pelletier michel@digicool.com
Sun, 28 Jan 2001 11:12:49 -0800 (PST)


Check out the zope-zeo list archives and read the thread "ZODB database
corruption under multiple connections" thread.  At the end, Jim mentions
that conflict error read checks were added back into the code for some
reason about inconsistencies.  He also mentions to "sync" often to avoid
conflicts.  Perhaps if you grock the thread (I just glanced at it) you can
get a better idea.

-Michel

http://lists.zope.org/pipermail/zope-zeo/2001-January/date.html

On 28 Jan 2001, Morten W. Petersen wrote:

> Hi zopers,
>
> I'm having problems with a product I'm developing.  The product is part of the
> ZopeGUM package, the GUM product.  If you have a look in gum.py in that
> product, you can see a method named _retrieve_messages, which can at
> times store enourmous amounts of objects and data in one transaction.
>
> Now, if I access the GUM instance at the same time as this method is being
> called, I may either get a ConflictError raised in the page, or in the
> Zope debug output.
>
> I've read all the posts I could find regarding ConflictErrors, and they
> mention that careful programming could help in avoiding these exceptions.
> I'm assuming that this applies only to whenever two threads are trying
> to *modify* the same object; and frankly, I can't see where I'm modifying
> any objects, unless modifying one object, an rfc822_message instance in
> a message_container instance also somehow modifies the message_container.
>
> Any idea what I'm doing wrong?
>
> Thanks & cheers,
>
> Morten
>
> _______________________________________________
> 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 )
>
>