[ZODB-Dev] ZODB packing error
Tim Peters
tim at zope.com
Sun Apr 4 23:22:44 EDT 2004
[Marius Gedminas, on 0-day packing]
> ...
> IOW there is no corruption. I must have misunderstood the discussions
> about 0-day packing I skimmed on zope and zodb-dev.
Oh, I'm not sure about that. I'm not a ZODB expert (although I expect to
become one). Things can certainly get complicated. For example,
- Transaction T1 loads an object O with a reference to persistent object
P, and modifies some other attribute of O (it does not load P itself).
- Other transactions remove the reference from O to P, and all other
references to P, from the database.
- A pack to current time is done. Now the only reference to P lives in
memory, inside T1's view of O.
- T1 finally tries to commit.
At this point, I see nothing to prevent O from having a "dangling reference"
to P -- T1 itself never loaded P into memory, and the database no longer
contains any trace of P, but O still references it. That probably isn't
good.
>> We did fix one major bug of this kind "recently": if you packed to
>> a time earlier than a time previously packed to, it was possible to
>> lose data. That's fixed in the current releases of ZODB.
> Does this bug exist in 2.6.2 (the latest Zope packaged for Debian)?
The bug in question was fixed in ZODB 3.1.5, released on 12-Feb-2004. This
corresponds to the Zope 2.6.4 release. A brief account of ZODB 3.1 bugs and
release dates can be found here:
http://zope.org/Products/ZODB3.1/NEWS
More information about the ZODB-Dev
mailing list