retrying failing SQL statements is harmful when not autocommitting [ copy of
rubyforge jruby-extras #18846 ]
------------------------------------------------------------------------------------------------------------
Key: JRUBY-2297
URL: http://jira.codehaus.org/browse/JRUBY-2297
Project: JRuby
Issue Type: Bug
Components: ActiveRecord-JDBC
Environment: activerecord-jdbc 0.7.2
Reporter: craig mcmillan
Attachments: no_retry_if_no_autocommit.patch
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. very confusing
this patch, against 0.7.2, avoids retrying when the connection is
autoCommitting. and the underlying exception
is thrown
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email