[ZODB-Dev] possible bug in Catalog.py with keyword index ?
Dieter Maurer
dieter at handshake.de
Fri Jul 20 13:46:35 EDT 2007
Joachim Schmitz wrote at 2007-7-20 10:40 +0200:
Obviously, you got the wrong mainling list.
This is not a ZODB problem...
> ...
>I found in Catalog.py updateMetadata around line 306
>
> else:
> if data.get(index, 0) != newDataRecord:
> data[index] = newDataRecord
>
>the if condition evaluates always to false, cause the data.get(index,0)
>accesses the data of the index and not of the metadata field as long as
>Zope was not restarted that worked fine.
The code above should prevent a write (which would grow the storage)
when in fact nothing changed. And it looks correct.
I expect "index" is a misleading term. It is indeed the catalog
id for the catalogued object. It is *not* accessing an index
but in fact the metadata.
Beside this, your sentence is a bit difficult to parse.
Maybe you try again (in a different list, probably "zope at zope.org")
to state precisely what went wrong -- under what precise conditions.
--
Dieter
More information about the ZODB-Dev
mailing list