[ZODB-Dev] What's in my database?

Magnus Lycka magnus@thinkware.se
Fri, 11 Oct 2002 01:59:04 +0200


I have some database files that have lived for quite
some time, while my application has changed a lot.

Looking at the database file with ZODB3/Tools/analyze.py
or zodbanalyze.py, I see some odd objects that shouldn't
be there. One extra object each of two classes, and two
objects of a class that should no longer be used. (It's
basically one object with another object as an attribute,
which in turn has the last two spurious objects.)

Obviously, they are still there through some reference
I failed to remove. I had more of these before, and I
got rid of them when I realized where I forgot to remove
a ref. That removed two out of three extra objects (with
sub-objects) but one is still hanging on... I can't see
how, and I realize that the attribute reference that
makes it stick might not even exist anymore in my code...

Is there any simple way to figure this out? I can see
in the analyze tools that I have 17 instead of 16
objects, but I can't manage to find out any way to
get to this 17th object...

(Maybe I should study the weakref module...for my next
project...)


--=20
Magnus Lyck=E5, Thinkware AB
=C4lvans v=E4g 99, SE-907 50 UME=C5
tel: 070-582 80 65, fax: 070-612 80 65
http://www.thinkware.se/  mailto:magnus@thinkware.se