[ZCM] [ZC] 1734/ 4 Comment "BTrees conflict resolution leads to
index inconsistencies"
Collector: Zope Bugs, Features,
and Patches ...
zope-coders-admin at zope.org
Wed Mar 23 03:13:40 EST 2005
Issue #1734 Update (Comment) "BTrees conflict resolution leads to index inconsistencies"
Status Accepted, Database/bug critical
To followup, visit:
http://www.zope.org/Collectors/Zope/1734
==============================================================
= Comment - Entry #4 by d.maurer on Mar 23, 2005 3:13 am
Uploaded: "BTreesEmptyConflict.pat"
- http://www.zope.org/Collectors/Zope/1734/BTreesEmptyConflict.pat/view
Patch attached
________________________________________
= Edit - Entry #3 by tim_one on Mar 22, 2005 6:21 pm
Changes: submitter email, revised version_info, new comment
Updated version info.
________________________________________
= Assign - Entry #2 by tim_one on Mar 22, 2005 5:47 pm
Status: Pending => Accepted
Supporters added: tim_one
Brrrrrrr. Thanks for the report, Dieter! Assigned to myself.
________________________________________
= Request - Entry #1 by d.maurer on Mar 22, 2005 2:47 pm
Zope indexes use code like this to remove document ids from
document lists:
def removeForwardIndexEntry(self, entry, documentId):
indexRow = self._index[entry]
indexRow.remove(documentId)
if not indexRow:
del self._index[entry]
If a concurrent transaction adds a document id to the same
"indexRow", then this document id can be lost because
it is inserted into a document list discarded by the other
transaction.
Under normal conditions, a "ConflictError" would result
because two transactions modify the same object
(the document list). However, the BTrees conflict resolution
prevents the "ConflictError" and allows the loss.
The result is an index inconsistency: the forward index ("_index")
entry and the backward one ("_unindex") not longer correspond.
Further operations lead to "unable to remove documentId
from document list" exceptions.
I suggest to tighten BTrees conflict resolution not to allow
concurrent insertions when a bucket was emptied.
==============================================================
More information about the Zope-Collector-Monitor
mailing list