[ZODB-Dev] [ zodb-Bugs-555522 ] Defective IOBTree

noreply@sourceforge.net noreply@sourceforge.net
Mon, 13 May 2002 09:37:01 -0700


Bugs item #555522, was opened at 2002-05-13 12:37
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=115628&aid=555522&group_id=15628

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Guido van Rossum (gvanrossum)
Assigned to: Nobody/Anonymous (nobody)
Summary: Defective IOBTree

Initial Comment:
[Tim]
> Here's a "sharp" test case that fails on my box
(Windows, Python 2.1).
> No pickles, no packs, just a mix of IOBTree inserts
and deletes:
>
>     def testIOB(self):
>         b = IOBTree()
>         for i in xrange(29972): # reduce to 29971 and
it works
>             b[i] = i
>         for i in xrange(30): # reduce to 29 and it
works
>             del b[i]
>             b[i+40000] = i
>         print 'len(b)', len(b)
>         print 'len(b.keys())', len(b.keys())
>         print 'b.keys()[0]', b.keys()[0]  # fails
here
>
> I haven't yet scoured the source code for "999.06667"
<wink>.  This test
> does not fail if an IIBTree is used instead.

And it fails for Guido too.

This test fails in a similar way for IIBTrees:

    def testIIB(self):
        b = IIBTree()
        for i in xrange(29972*2):
            b[i] = i
        for i in xrange(30*2):
            del b[i]
            b[i+40000*2] = i
        print 'len(b)', len(b)
        print 'len(b.keys())', len(b.keys())
        print 'b.keys()[0]', b.keys()[0]

It's the same thing, except the trip counts have
doubled.  I assume, but
don't know, that this is related to that
DEFAULT_MAX_BUCKET_SIZE is twice as
large in _IIBTree.c than in _IOBTree.c.


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=115628&aid=555522&group_id=15628