[ZODB-Dev] CMS on top of ZODB
Dieter Maurer
dieter@handshake.de
Mon, 10 Feb 2003 20:16:51 +0100
Toby Dickenson wrote at 2003-2-10 15:16 +0000:
> On Monday 10 February 2003 2:11 pm, Chris McDonough wrote:
>
> > > I think, we could enhance the packing process to recognize
> > > special objects (based on classname) to hold references
> > > to older versions.
>
> Something similar is in DirectoryStorage 1.1, alpha 1 released today. Named
> classes can keep extra history, but there is no support for keeping extra
> history of the objects they reference.
I know but that's the easy part.
> > > Of course, packing would become considerably more expensive...
>
> I dont see why this should be true.
I am not sure it is true. Let's see:
The current packing probably uses a single pass over the storage
to determine the current versions. It then can copy versions (current
or sufficiently young) or discard them (otherwise).
Essentially, these are two sequential scans of the storage.
The proposed scheme would need one pass the determine the current versions
and the "anchor" objects (saving old versions).
When there are no "anchor" objects, everything can be as it is now.
If there are, versions (directly or indirectly) referenced from the anchor
objects must be determined. This will lead to a random access pattern
to the storage which becomes even more chaotic as the version
reference is indirect (reference to object with time; correct
version must be searched going back the current version to
the one with the correct date. This probably can be cached (in
the first pass). However, this may significantly increase memory consuption).
Copying/discarding versions is than as before.
Thus, we have the additional random access to determine
old but "fixed" versions.
Dieter