[ZODB-Dev] Re: BTrees strangeness (was [Zope-dev] Zope 2.X BIG Session problems - blocker - our site dies - need help of experience Zope developer, please)

Thomas Guettler hv at tbz-pariv.de
Wed Mar 3 09:17:31 EST 2004


Am Mittwoch, 3. März 2004 10:55 schrieb Chris McDonough:
> (boldly crossposting this to zodb-dev, please respond on one list or the
> other but not both)
>
> That error *appears* to be caused by reaching a state that is impossible
> to reach.  The code in question is:
>
>         for key in list(self._data.keys(None, max_ts)):
>             assert(key <= max_ts)
>             STRICT and _assert(self._data.has_key(key))
>             for v in self._data[key].values():
>                 to_notify.append(v)
>             del self._data[key]
>
> The line that says "for v in self._data[key].values()" is the line that
> throws the KeyError.   But it should be impossible for the code to throw
> a KeyError for the expression "self._data[key]" because the "keys"
> method of the _data IOBTree just told us that the key named by "key" was
> one of its keys via the range search;

This can happen if the btree is insane. Do you know
the part of the ZODB guide?

http://zope.org/Wikis/ZODB/FrontPage/guide/node6.html#SECTION000631000000000000000


HTH,
 Thomas




More information about the ZODB-Dev mailing list