[ZODB-Dev] Recursion Error with ape and ZCatalog

Shane Hathaway shane at zope.com
Thu Apr 8 15:12:40 EDT 2004


On Fri, 9 Apr 2004, Klaus Woelfel wrote:

> On W, 7. April 2004 23:43 Shane Hathaway wrote:
> 
> > I would normally suspect infinite recursion when the maximum stack depth
> > is exceeded, but the fact that it was exceeded only when the database grew
> > makes me wonder if the need was legitimate.
> 
> what does this mean "the need was legitimate"?

I mean that the code may actually need to build a very large stack to
store a BTree structure.  If so, Ape needs a new strategy for dealing
with BTrees.

> > > > Yes, by default Ape loads and stores database-like things as one big
> > > > file.  We should look at serializing BTrees in a more scaleable manner.
> 
> Would it be better if I would use your BTreeFolder2 instead of just a plain 
> BTree to store the objects?

I don't know yet.  I need to investigate the ZCTextIndex problem to get 
more clues.

> I tried to store some objects in a BTreFolder2 in 
> ape fs storage and the objects appeard in their own files, so there the BTree 
> seems to be not stored entirely in one file. I looked at "ofsserial.py" and 
> saw that ape treats BTreeFolders in a special way. I wonder about Line 140:
> 
>             # The tree and the buckets are unmanaged.
>             event.upos.extend(find_unmanaged(obj._tree, obj._tree.values()))
> 
> So are the objects in a BTreeFolder stored twice - as their own files and as 
> part of the BTree alltogether in one big file?

No.  That line makes Ape aware of objects that *are not* stored, yet which
contain things that *are* stored.

Shane



More information about the ZODB-Dev mailing list