[Zope-dev] Bulletproof ZCatalog proposal

Shane Hathaway shane@digicool.com
Thu, 31 May 2001 11:07:39 -0400 (EDT)


On Thu, 31 May 2001, Erik Enge wrote:

> On Thu, 31 May 2001, Shane Hathaway wrote:
>
> > How did you miss the point?  That's exactly the point! :-)
>
> Oh :)
>
> > Right now ZCatalog randomly generates ConflictErrors even if there are
> > no conflicts in the data being indexed.
>
> This is why I think I've missed a/the point: wouldn't it be better to
> figure out why ZCatalog randomly generates these ConflictErrors instead of
> making them disappear using other means?

We know why they happen.  They are only *apparently* random--they actually
make perfect sense.  (Maybe I didn't make that clear.)  If you
concurrently modify objects that happen to be placed near enough each
other in one of the indexes then a conflict will occur.  We have a partial
solution in place which tries to merge the buckets that make up the index,
but this solution can't solve the whole problem.

Think about what SQL databases do.  You can add entries to a table
simultaneously from different connections.  As long as the contents of
the entries don't conflict, there will not be any kind of conflict in the
indexes either.

ZCatalog is to ZODB what indexes are to SQL databases.  I'd like ZCatalog
to have the same level of reliability.

Shane