[ZODB-Dev] Immutable blobs?

Laurence Rowe l at lrowe.co.uk
Mon May 9 08:26:08 EDT 2011


While looking at the Plone versioning code the other day, it struck me
that it would be much more efficient to implement file versioning if
we could rely on blobs never changing after their first commit, as a
copy of the file data would not need to be made proactively in the
versioning repository incase the blob was changed in a future
transaction.

Subclassing of blobs is not supported, but looking at the code I
didn't see anything that actively prevented this other than the
Blob.__init__ itself. Is there something I've missed here? I had
thought that an ImmutableBlob could be implemented by overriding the
open and consumeFile methods of Blob to prevent modification after
first commit.

Laurence


More information about the ZODB-Dev mailing list