[Zope3-dev] Please, no bare 'except:' clauses!
Jim Fulton
jim@zope.com
Tue, 12 Nov 2002 08:13:12 -0500
Shane Hathaway wrote:
> On Mon, 11 Nov 2002, Jim Fulton wrote:
>
>
>>>1) Don't let DatabaseErrors be so special any more. Currently, we want
>>>ConflictErrors to propagate, in order to prevent inconsistent data from
>>>being committed, and to give the app an opportunity to retry. But
>>>excessive exception catching ought not to be so catastrophic. I think
>>>any attempt to write or commit after a ConflictError has occurred should
>>>result in another ConflictError, since the data being written is
>>>generated from inconsistent data. AFAICT this would eliminate the need
>>>to make DatabaseErrors special, and would only change ZODB.
>>>
>>This is already the case.
>>
>
> In ZODB 4?
In ZODB 3. I'm not sure about ZODB 4. In ZODB, a read conflict doesn't
abort the current transaction. It causes the object's data to remain
unloaded. Any additional attempts to read the data will generate more
conflict errors.
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