[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)

Chris McDonough chrism at plope.com
Wed Mar 3 16:40:25 EST 2004


On Wed, 2004-03-03 at 15:53, Dieter Maurer wrote:
> Chris McDonough wrote at 2004-3-3 04:55 -0500:
> >(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; it should be an invariant.
> 
> If we had a low conflict connection, I would understand how
> this could happen:

That explanation makes sense, but FWIW, I no longer use a low conflict
connection in Zope 2.7.

- C






More information about the ZODB-Dev mailing list