[ZODB-Dev] undo and zodb
Jim Fulton
jim@zope.com
Tue, 03 Sep 2002 10:29:34 -0400
Toby Dickenson wrote:
> On Tuesday 03 Sep 2002 2:04 pm, Barry A. Warsaw wrote:
>
...
>> It has an autopack()
>>method, but I'm still teasing out the semantics of that. The idea
>>would be to have a storage-wide setting controlling how far back
>>transactions would be kept, although you wouldn't be able to access
>>those older transactions through the api.
>>
>
> I see Autopack uses a reference count. That is efficient, but it does mean
> that one small bug or database corruption can lead to it deleting whole
> sections of your database. Ive no reason to think that it currently has such
> a bug, but I am hoping to aim for a more fault-tolerant solution for
> DirectoryStorage.
I don't see that reference counting has much to do with this. If you have
an application that makes objects unreachable, then the unreachable objects
will be removed at a pack.
An application bug like:
ob = container[oldid]
del container[oldid]
get_transaction().commit()
container[newid] = ob
get_transaction().commit()
Can cause lossage with FileStorage if it is sufficiently unlucky. ;)
It will definately cause lossage with Packless (although, as I
mentioned in another note, we could fix this). The probability of
lossage with autopack is much lower, but increases with increating
pack frequency.
Jim
--
Jim Fulton mailto:jim@zope.com Python Powered!
CTO (888) 344-4332 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org