[ZODB-Dev] Storage API packing question

Toby Dickenson tdickenson@geminidataloggers.com
Wed, 29 May 2002 16:11:35 +0100


On Wednesday 29 May 2002 2:50 pm, Jim Fulton wrote:

> It would probably be better if the tests were more realistic, however,
> I would prefer that, unreferenced objects stay around for some period o=
f
> time to protect against pathelogical applications that keep references =
to
> otherwise unreferenced objects for some period of time. =20

That would be quite some pathology. I usually pack keeping 30 days of=20
revisions. The object must have been unreachable in ZODB but hanging arou=
nd=20
in memory for 30 days before this makes a difference.

If anything keeps hold of a reference to an unreachable object then it is=
 just=20
a matter of time (literally) before it runs into problems. Im not comfort=
able=20
with the idea that I have no way to tell if this is happening in my=20
application. Does it make sense to flag unreachable objects as such, and=20
issue a "that could have hurt" warning if they are loaded, or modified?

A related question... should the default pack time in the Zope management=
=20
interface be larger than zero?


> In fact, I really
> wouldn't mind having a way to keep unreferenced objects around for some
> period of time in the Berkeley Packless storage.

Yes, I was looking at this earlier (Trying to work out why Packless didnt=
 fail=20
the undo unit test... that took longer than it should have done ;-)

The Packless.pack function already has all the time information it needs,=
 it=20
just needs to check it before calling _takeOutGarbage.