[ZCM] [ZC] 291/ 3 Resolve "ZCatalog deleting an indexed property"
Collector: Zope Bugs and Patches ...
zope-coders@zope.org
Wed, 13 Mar 2002 09:25:12 -0500
Issue #291 Update (Resolve) "ZCatalog deleting an indexed property"
Status Resolved, Catalog/bug+solution medium
To followup, visit:
http://collector.zope.org/Zope/291
==============================================================
= Resolve - Entry #3 by htrd on Mar 13, 2002 9:25 am
Status: Accepted => Resolved
merged in the trunk for 2.6, but not in the 2.5 branch yet
________________________________________
= Comment - Entry #2 by ajung on Mar 13, 2002 8:41 am
Looks like you found a long outstanding problem with
FieldIndexes. Can you check the patch into trunk and 2.5 branch ?
-aj
________________________________________
= Request - Entry #1 by htrd on Mar 13, 2002 7:56 am
Status: Pending => Accepted
Supporters added: htrd
Uploaded: "deleteproperty.diff"
- http://collector.zope.org/Zope/291/deleteproperty.diff/view
Suppose a ZCatalog FieldIndex has indexed an object A with a property B. The A.B has the value 'hello'.
Now A.B changes to the value 'world', and the object is reindexed. The field index reindex_object does its work in two phases:
1. First it removes the forward mapping 'hello'->docid
2. It adds a new forward mapping 'world'->docid and overwrites the reverse mapping to docid->'world'
Now suppose that property is deleted, and the object reindexed.
The first phase happens as before, removing the forward mapping 'world'->docid. The second phase does not happen because there is no new forward mapping.
However, this leave the indexes in an inconsistent state, because the reverse mapping docid->'world' is still present. The code for the first phase doesnt remove it because it is assuming the second phase will overwrite it, but that does not account for cases where the property is removed and the second phase is not run.
==============================================================