Re: [Zope3-Users] unregister, delete and pack, still no gc?
Hey Roy, Can happen that BTrees keep deleted objects referenced, so they're not gc'ed. See https://bugs.launchpad.net/bugs/294788 Tuesday, December 23, 2008, 8:35:22 AM, you wrote: RM> Hi Folks, RM> I have either stumbled on a storage leak in the ZODB, or I am RM> missing something in my understanding of registration. RM> Briefly, if I add a folder to the ZODB, make it a site, then RM> unregister it, delete it and pack the ZODB, I see the ZODB RM> increase in size.Each time I run the tests, the ZODB keeps growing RM> (by about 7KB). I restarted the ZODB to see if it would help, but no! RM> Here are my exact steps: RM> 1. add a Folder RM> 2. make a the folder a site. RM> 3. register the folder (unnamed utility of type ISite) RM> 4. remove the registration from the "registrations" tab. RM> 5. delete the folder. RM> 6. pack the ZODB. RM> I have also attached a selenium test that performs all of this. -- Best regards, Adam GROSZERmailto:agros...@gmail.com -- Quote of the day: "I must do something" will always solve more problems than "Something must be done." - Unknown ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] unregister, delete and pack, still no gc?
Hi Roy > Betreff: [Zope3-Users] unregister, delete and pack, still no gc? > > Hi Folks, > > I have either stumbled on a storage leak in the ZODB, or I am > missing something in my understanding of registration. > > Briefly, if I add a folder to the ZODB, make it a site, then > unregister it, delete it and pack the ZODB, I see the ZODB > increase in size.Each time I run the tests, the ZODB keeps > growing (by about 7KB). I restarted the ZODB to see if it > would help, but no! > > Here are my exact steps: > > 1. add a Folder > 2. make a the folder a site. > 3. register the folder (unnamed utility of type ISite) 4. > remove the registration from the "registrations" tab. > 5. delete the folder. > 6. pack the ZODB. > > I have also attached a selenium test that performs all of this. This topic is on my todo list since a very long time. There is defently something wrong with the concept or at least how we use it. Here are some of my guesses. I think the problem is related to the deep of object references the carbage collector will follow. The carbage collector only looks for referenced objects. As long as an object has a reference to any other object it doesn't get removed. The problem could be solved if the carbage collector whould follow to the DB root for each object. My guess is that the carbage collector doesn't look for such root references. (could be very slow) If my guess is correct, the following happens. Since we have annotations and nothing will cleanup the annotation and it's referenced objects, this objects will stay forever. e.g. security map, dublin core And it also means: In your custom project, you have to take care on every reference. This means you have to set every object reference and back reference to None if you remove objects. Are I'm right or totaly wrong? Regards Roger Ineichen _ END OF MESSAGE ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users