rails/deadlock_retry

avoid stack too deep with alias_method

Opened this issue · 0 comments

Use something like what follows in deadlock_retry.rb
if !method_defined?(:transaction_without_deadlock_handling)
alias_method :transaction_without_deadlock_handling, :transaction
alias_method :transaction, :transaction_with_deadlock_handling
end

For some reason the the code was executed twice.