Bugs item #18846, was opened at 2008-03-14 16:03
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=7857&aid=18846&group_id=2014

Category: AR-JDBC
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 3
Submitted By: craig mcmillan (mccraig)
Assigned to: Nobody (None)
Summary: retrying failing SQL statements is harmful when not autocommitting

Initial Comment:
method JdbcAdapterInternalService.withConnectionAndRetry catches exceptions 
from failing SQL statements, and retries them, after reconnecting any failed 
connections

this might be a good idea when the connection is autocommitting, but goes awry 
when a longer transaction is in progress

- the underlying exception is masked
- the retry may be on a different connection, leading to parts of a supposed 
transaction being executed on different connections, and contention between the 
statements executed earlier in the transaction on one connection, and those 
executed on the second connection

this patch, against 0.7.2, avoids retrying when the connection is 
autoCommitting.  and the underlying exception is thrown

----------------------------------------------------------------------

>Comment By: Nick Sieger (nicksieger)
Date: 2008-06-03 17:25

Message:
Thanks for the nice patch! Sorry I didn't apply it sooner.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=7857&aid=18846&group_id=2014
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel

Reply via email to