Commit a710bb29 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'ab/optimistic-locking-txn' into 'master'

Use transaction on model instead of connection

See merge request gitlab-org/gitlab!68633
parents d2f68718 75979421
......@@ -11,7 +11,7 @@ module Gitlab
retry_attempts = 0
begin
ActiveRecord::Base.transaction do # rubocop: disable Database/MultipleDatabases
subject.transaction do
yield(subject)
end
rescue ActiveRecord::StaleObjectError
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment