[ZODB-Dev] Preliminary notes from fixing a bad data.fs
Jeremy Hylton
jhylton at gmail.com
Mon Jan 10 10:06:37 EST 2005
On Mon, 10 Jan 2005 09:05:09 -0500, ethan fremen <lists at mindlace.net> wrote:
> Right now, not being able to pack is a dangerous behaviour. I don't want
> to correct one problem by causing a worse one, but it seems to me like
> some sort of logging of what had to be done to make the pack succeed
> would be appropriate in this circumstance. The old Data.fs is still
> around after a pack, so the user can dig through it for the broken object.
I think the pack authors took the attitude that packing bogus data is
more dangerous than not packing. Not packing does not destroy any
data. Packing a damaged data.fs can lead to arbitrary data loss. In
the limit, if the root object is unpicklable, pack deletes everything.
The old version of the data.fs is still around, but not for long if
you've got a regularly scheduled pack.
If pack fails, you're supposed to fix the data.fs some other way and
then run pack. I think this fails because there may not be any way to
fix the data.fs so that it will pack.
Perhaps there should be a pack option to throw caution to the wind and
pack no matter what, but it shouldn't be the default.
Jeremy
More information about the ZODB-Dev
mailing list