Skip to content

Commit

Permalink
CICO-38429: Rescue ActiveRecord::TransactionIsolationConflict instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Herr committed Feb 17, 2017
1 parent 1b67392 commit c8b70c1
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/lhm/chunker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@ def execute

begin
affected_rows = @connection.update(copy(bottom, top(stride)))
rescue ActiveRecord::StatementInvalid => err
if err.message.downcase.index('deadlock').nil?
raise
return
end

rescue ActiveRecord::TransactionIsolationConflict => err
if !@retry_on_deadlock
raise
return
Expand Down

0 comments on commit c8b70c1

Please sign in to comment.