[Zope-DB] Problems with transaction management and many database adapters

Federico Di Gregorio fog at initd.org
Fri Feb 6 16:19:48 EST 2004

Il ven, 2004-02-06 alle 21:25, Dieter Maurer ha scritto:
> Federico Di Gregorio wrote at 2004-2-5 20:27 +0100:
> >Il gio, 2004-02-05 alle 19:29, Dieter Maurer ha scritto:
> >> I tried (in our private Zope installation) to do error handling
> >> in the same transaction as the main thread (as Toby suggested).
> >> But I failed due to a "get_transaction().begin()" at the begin of error
> >> handling (this calls an implicite "abort").
> >
> >my view on the problem is that inside error handling code you can't
> >count on anything. db connection? can be fsck-ed. everything can be
> >fsck-ed, so an almost static page with (hidden) debug info and (visible)
> >excuses to the user is more than enough. zope is doing the right thing,
> >it just need to advertise its behaviour so that nobody gets bitten
> >again.
> Of course, I disagree:
>   The current Zope behaviour is a (potentially) severe bug:

of course, I agree. :) _currently_ it is a bug because zope let you use
almost everything (the wrong way) during error handling. and note that I
said "error", not "exception", i.e., when the exception is not handled
by user code but propagates. this is plain wrong. error handling should
be done in a sealed environment where everything potentially dangerous
is disallowed *or* in the same transaction before the abort (but i don't
like this solution.)

Federico Di Gregorio                         http://people.initd.org/fog
Debian GNU/Linux Developer                                fog at debian.org
INIT.D Developer                                           fog at initd.org
  There are 10 types of people in this world, those that understand
   binary, and those that don't.                   -- Michael Gittelsohn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Questa parte del messaggio =?ISO-8859-1?Q?=E8?= firmata
Url : http://mail.zope.org/pipermail/zope-db/attachments/20040206/095eeb95/attachment.bin

More information about the Zope-DB mailing list