[ZODB-Dev] BTrees q [Fwd: [Zope-dev] More Transience weirdness in 2.7.1b1]

Dieter Maurer dieter at handshake.de
Thu Jun 3 18:07:56 EDT 2004


Chris McDonough wrote at 2004-6-2 16:24 -0400:
> ...
>I am wondering how the "RuntimeError:  bucket being iterated over" error
>could get raised given that the code from which the RuntimeError
>emanates is:
> ...
>        for key in list(self._data.keys(None, max_ts)):
> ...

I see only a single possibility: loading
"currentbucket->next" brings a bad state into memory, one
with "currentbucket->next->len <= 0".

Reason: "list" will access the "keys" iterator with successive
indexes. Therefore, "delta" will be "1" for each access.
As long as "currentoffset < currentbucket->len - 1",
the exception cannot be raised (unless "currentoffset" had been
negative to start with). Otherwise, "currentoffset" is set to "0"
and we move on to the next bucket. When the exception is
raised, then we have "0 >= currentbucket->len".

Maybe, something destroyed the bucket content?

-- 
Dieter



More information about the ZODB-Dev mailing list