[ZODB-Dev] undo and zodb

Jim Fulton jim@zope.com
Wed, 04 Sep 2002 15:19:42 -0400


Toby Dickenson wrote:
> On Tuesday 03 Sep 2002 4:03 pm, Jim Fulton wrote:
> 

...

>>>>There could
>>>>even be a special error type that would allow the database to recover the
>>>>lost object.
>>>>
>>>That recovery couldnt be 100% reliable because the lost object may have
>>>been turned into a ghost by the cache.
>>>
> 
> Any objections to adding a definition of a DanglingReferenceError to the 
> POSException module?

Not at all.


> On Tuesday 03 Sep 2002 3:33 pm, Jim Fulton wrote:
> 
>>Toby Dickenson wrote:
>>
>>>On Tuesday 03 Sep 2002 2:10 pm, Barry A. Warsaw wrote:
>>>
>>>>Autopack.py should solve this problem.
>>>>
>>>By ensuring that it doesnt remove unreferenced objects until they have
>>>been unreferenced for a fixed length of time?
>>>
>>Right. This is less a solution than a mitigation.
>>It *is* possible to solve (well, maybe further mitigate) the problem,
>>as I sketched out elsewhere.
>>
> 
> I think it is useful to implement both approaches. The explicit reference 
> checks mean we raise an exception rather than committing a dangling 
> reference. The extra delay on packing means that these weird transactions can 
> commit normally (no exceptions, no dangling references, indeed no sign of any 
> problem)

Yup.

Have you actually encountered transactions like this?

Jim

-- 
Jim Fulton           mailto:jim@zope.com       Python Powered!
CTO                  (888) 344-4332            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org