[ZODB-Dev] Storage API packing question

Steve Alexander steve@cat-box.net
Wed, 29 May 2002 14:08:43 +0100


Toby Dickenson wrote:
> I have been looking into why DirectoryStorage is failing some of the ZODB 
> Storage interface unit tests. It appears that some of the tests are 
> implicitly relying on one characteristic which all of the current storages 
> have in common. I am not sure whether this is a limitation of the tests, or a 
> necessary requirement of the Storage interface.
> 
> On packing, the current storages which support undo will keep:
> 1. All revisions of all objects dated after the pack date
> 2. At least the current revision of all objects reachable from the root
>    (even if this is before the pack date)
> 
> My question is: Is it ok for an undo-supporting storage to remove all 
> revisions of unreachable objects? 
> 
> In most normal operation it doesnt make a difference - thats what 
> *unreachable* means. It only makes a difference if something outside the ZODB 
> is keeping a copy of the oid, and anything doing this is sure to break when 
> used with a non-undoing storage.

What about objects that are unreachable from the root object, but are 
reachable from a previous revision of some reachable object, where that 
previous revision is retained?

--
Steve Alexander