summaryrefslogtreecommitdiff
path: root/db/fixtures/development/04_project.rb
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-11-24 10:40:44 +0100
committerYorick Peterse <yorickpeterse@gmail.com>2016-11-25 13:35:01 +0100
commit92b2c74ce14238c1032bd9faac6d178d25433532 (patch)
treed17f91f55068655b0fd7c1297ae4dce7311d9485 /db/fixtures/development/04_project.rb
parent3943e632103271b3683e0cc355f0fef4c9452491 (diff)
downloadgitlab-ce-92b2c74ce14238c1032bd9faac6d178d25433532.tar.gz
Refresh project authorizations using a Redis leaserefresh-authorizations-with-lease
When I proposed using serializable transactions I was hoping we would be able to refresh data of individual users concurrently. Unfortunately upon closer inspection it was revealed this was not the case. This could result in a lot of queries failing due to serialization errors, overloading the database in the process (given enough workers trying to update the target table). To work around this we're now using a Redis lease that is cancelled upon completion. This ensures we can update the data of different users concurrently without overloading the database. The code will try to obtain the lease until it succeeds, waiting at least 1 second between retries. This is necessary as we may otherwise end up _not_ updating the data which is not an option.
Diffstat (limited to 'db/fixtures/development/04_project.rb')
-rw-r--r--db/fixtures/development/04_project.rb1
1 files changed, 0 insertions, 1 deletions
diff --git a/db/fixtures/development/04_project.rb b/db/fixtures/development/04_project.rb
index 18a2df7c059..a984eda5ab5 100644
--- a/db/fixtures/development/04_project.rb
+++ b/db/fixtures/development/04_project.rb
@@ -1,5 +1,4 @@
require 'sidekiq/testing'
-require './db/fixtures/support/serialized_transaction'
Sidekiq::Testing.inline! do
Gitlab::Seeder.quiet do