[Zope-dev] ZCatalog "Key Error" question

zope-dev at rosenthaltechnologies.com zope-dev at rosenthaltechnologies.com
Fri Sep 1 11:44:44 EDT 2006


> Read or Write conflict errors? 

I'm getting the "Key Error" traceback on Reads, but my guess is that the
actual "error" happens sometime before the "Key Error", when the
ZCatalog itself is corrupted.  I am not sure what that is, because it
does not generate an error.

However, I see the error when I call ZCatalogInstance.Search(...), and
only when the Search includes objects that are corrupted in the
ZCatalog.

> Are the objects modified at the same time by other threads?

I'm not sure about this.  I'm running ZEO, and in general, I think I can
cause the error when I am the only user on the system, only issuing one
request.  However, I'm getting another ConflictError when I try to set
an attribute value of a ZODB object during the execution of a script,
and I'm told that may be because there is a problem accessing the same
object from multiple threads.

Is there a good article that you know of that I could find out more
about thread-safe programming in ZEO?

Best,
Brian



On Fri, 01 Sep 2006 09:27:41 +0200, "Andreas Jung" <lists at zopyx.com>
said:
> 
> 
> --On 1. September 2006 02:54:26 -0400 zope-dev at rosenthaltechnologies.com 
> wrote:
> 
> >
> > I have a Zope product that relies heavily on a ZCatalog to search for
> > objects within a folder matching certain criteria.  The ZCatalog
> > frequently becomes corrupt, and on searching the catalog, the catalog
> > gives me key errors.  I'm trying to figure out what causes the
> > corruption so I can stop doing whatever I am doing to corrupt the
> > ZCatalog.
> >
> >
> 
> Read or Write conflict errors? Are the objects modified at the same time
> by 
> other threads?
> 
> -aj
--------------------
Brian Rosenthal
General Partner, RoboCommerce, LLC
brian at robocommerce.com
http://www.robocommerce.com
800-644-7626



More information about the Zope-Dev mailing list