[ZODB-Dev] Preventing a folder from being packed

Toby Dickenson tdickenson at geminidataloggers.com
Fri May 16 01:24:41 EDT 2003


On Thursday 15 May 2003 6:48 pm, sean.upton at uniontrib.com wrote:
> Forgive my ignorance, but wouldn't this be a bit of work?  Since ZODB
> essentially just persists objects and references, I wonder how much of a
> mismatch and additional complexity the Zope-level notion of
> folders/containment hierarchies would add to the storage.

I think it could be very little complexity. From the point of view of the ZODB 
reference graph, folders objects are the only entry point to islands of 
references.

We could create a subclass of Folder, ExtraHistoryFolder, that is identical to 
Folder in every way except for class name. When the storage is traversing its 
reference graph during packing it would detect this class name, switch to a 
different mode, and handle all objects below there in a different manner.

Zope-level 'hard links' would break this.

> I like the per-class adjustment of history, because this
> maps well in and out of Zope

Could we leverage this here as an alternative solution? An application-level 
mechanism could cause objects in this special containment heirarchy to have a 
different class.

Thats only slightly nasty.

> My thinking is that this is what DBTab is likely the solution for: mount a
> different storage for every containment hierarchy in Zope that needs
> specific performance, feature, and pack capability sets?  Would this not be
> a more simple solution?

Maybe if you only have a few such containment hierarchies - maybe not if you 
have 100's

Doing everything in one storage makes for easier backup and replication too.

-- 
Toby Dickenson
http://www.geminidataloggers.com/people/tdickenson



More information about the ZODB-Dev mailing list