Bugzilla doesn't roll back transactions on errors when using eval

Simon Green sgreen at redhat.com
Tue Aug 27 11:31:45 UTC 2013


On 27/08/13 20:08, Gervase Markham wrote:
> I've just found a long-standing bug in a Bugzilla extension I maintain.
> 
> The fix was to manually close the transaction when I had a failure, but
> the need to do this was not at all obvious.
> 
> This error behaviour seems wrong to me (in that it exposes weird
> requirements on the user of an API which are not obvious and easy to
> miss or get wrong), but I'm not entirely sure what the best fix is.
> Comments?

brc was also affected by a similar issue not so long ago (wrapping some
code in an eval that started a transaction, but did not finish). Took
about four hours to debug it, followed by a lot of cursing.

Since all code is run by individual *cgi or *pl scripts (and doesn't
have a global exit point), I'm not sure if there is a fix for the issue
either (other than not using eval, which is the solution I went for)

-- 
Simon Green
Software Engineer
Red Hat Asia Pacific Pty Ltd



More information about the developers mailing list