[ZODB-Dev] Re: ZODB packing error

Tim Peters tim at zope.com
Mon Apr 5 13:27:29 EDT 2004


[Jeremy Hylton]
>> Despite that it's possible to implement, I should say: who cares?
>> Pack is an infrequent operation and conflict resolution is a
>> performance optimization.  If an infrequent pack causes an occasional
>> performance hack to fail, it doesn't make any significant difference.
>> In particular, the conflict resolution might have failed anyway, so
>> the application programmer still needs to be prepared for it.

[Casey Duncan]
> AFAIK we weren't talking about performance, but not creating dangling
> references when packing. I agree that pack performance is not terribly
> important.

Pack performance is important, and increasingly so as databases grow ever
larger.  Jeremy was only saying that an occasional ConflictError more or
less doesn't make a significant difference.

But I'm not sure dangling references can be prevented by hacking pack, even
in theory --  if the only remaining reference to an object is in memory on a
ZEO client side, it's just not natural for a ZEO server to know about that.

Offline, Jeremy noted that Toby's DirectoryStorage prevents dangling
references via another means:

    http://dirstorage.sourceforge.net/features.html
    ...
    DirectoryStorage is the only storage to have checks to
    prevent committing transaction containing dangling references,
    one possible cause of a POSKeyError.

That is, DirectoryStorage doesn't try to prevent a client from creating
dangling references (and as above, I'm not sure it's possible to prevent
such), but it does prevent committing a transaction containing a dangling
reference.  If I actually understood ZODB, I bet that would be achievable in
finite time.




More information about the ZODB-Dev mailing list