Skip to content

Commit ac52389

Browse files
committed
translate_exception is already called in the log block, which accounts
for most if not all queries we want to retry, so assume it has been translated.
1 parent be4074e commit ac52389

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/active_record/connection_adapters/sqlserver/database_statements.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def transaction_with_retry_deadlock_victim(options = {})
8383
decrement_open_transactions
8484
# handle deadlock victim retries at the outermost transaction
8585
if open_transactions == 0
86-
if translate_exception(database_transaction_rollback, database_transaction_rollback.message).is_a?(DeadlockVictim)
86+
if database_transaction_rollback.is_a?(DeadlockVictim)
8787
# SQL Server has already rolled back, so rollback activerecord's history
8888
rollback_transaction_records(true)
8989
retry

0 commit comments

Comments
 (0)