[elephant-devel] txn
Ian Eslick
eslick at media.mit.edu
Wed Feb 20 22:43:42 UTC 2008
I'm not sure I understand this part? Do you mean if you have an
internal error which does not complete the intended transaction but
doesn't throw that through the 'with-transaction' statement then you
get bad data?
It seems that you may be expecting too much of the database. If you
are protecting complex web transactions that may take many different
paths, some correct and some not, there really is no way to resolve
all this from a context created at a higher point in the stack.
We allow nesting to make default transaction behavior easy - the outer
transaction determines the commit unit. Do you want an option to
catch an unexpected internal nesting?
I'll look at the rest of this tonight and comment.
Cheers,
Ian
On Feb 20, 2008, at 5:14 PM, Alex Mizrahi wrote:
> additionally, i've found some problems with "separatist" error
> handlers
> i.e.:
>
> (ele:with-transaction ()
> (handler-case (work-with-database)
> (error () (pring "we have a no-go")))
>
> if work-with-database produced some error, with-transaction will not
> able to
> know about this and thus could commit erroneous data.
>
> of course this is a problem of application, but sometimes such
> handlers are
> installed by web framework or dictated by architecture in some way.
> and it
> will be nice to be able to deal with such cases.
More information about the elephant-devel
mailing list