Comment 10 for bug 240381

Revision history for this message
Christian Theune (ctheune) wrote :

Actually this is interesting on the ZODB level. With current discussion about high quality backup strategies on the ZODB development list and the pointer back to this bug I found a solution how this might be solved easily on the ZODB level.

The underlying issue here is that blobs use the OID as the pointer to which file belongs to it. When copying a blob object that piece of data goes away. IMHO the ZODB kinda nurishes the assumption that the content of an object is what is stored in the pickle, so as a consequence if I pickle/unpickle such an object its value should be the same.

Thus th idea of a solution: we could save the OID in the state of the blob object and if that is different from the _p_oid then we know we need to initialise the blob from that object's state, e.g. by providing a new hard link to that file.

Maybe we don't even have to store that marker in the object's value persistently, but I don't know, we'll see.