Skip to content

Commit

Permalink
translate_exception is already called in the log block, which accounts
Browse files Browse the repository at this point in the history
for most if not all queries we want to retry, so assume it has been translated.
  • Loading branch information
jrafanie committed Nov 28, 2011
1 parent be4074e commit ac52389
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def transaction_with_retry_deadlock_victim(options = {})
decrement_open_transactions
# handle deadlock victim retries at the outermost transaction
if open_transactions == 0
if translate_exception(database_transaction_rollback, database_transaction_rollback.message).is_a?(DeadlockVictim)
if database_transaction_rollback.is_a?(DeadlockVictim)
# SQL Server has already rolled back, so rollback activerecord's history
rollback_transaction_records(true)
retry
Expand Down

0 comments on commit ac52389

Please sign in to comment.