gitlab-org--gitlab-foss/spec
Yorick Peterse 91b752dce6
Respond to DB health in background migrations
This changes the BackgroundMigration worker so it checks for the health
of the DB before performing a background migration. This in turn allows
us to reduce the minimum interval, without having to worry about blowing
things up if we schedule too many migrations.

In this setup, the BackgroundMigration worker will reschedule jobs as
long as the database is considered to be in an unhealthy state. Once the
database has recovered, the migration can be performed.

To determine if the database is in a healthy state, we look at the
replication lag of any replication slots defined on the primary. If the
lag is deemed to great (100 MB by default) for too many slots, the
migration is rescheduled for a later point in time.

The health checking code is hidden behind a feature flag, allowing us to
disable it if necessary.
2018-08-06 15:20:36 +02:00
..
bin Truncate filenames created by bin/changelog to 140 characters 2018-07-11 10:15:22 -07:00
config Make ObjectStoreSettings use more explicit and add specs 2018-07-24 14:44:44 +03:00
controllers Merge branch 'feature/gb/login-activity-metrics' into 'master' 2018-07-31 10:44:22 +00:00
db/production
dependencies Honor saml assurance level to allow 2FA bypassing 2018-06-25 15:32:03 +00:00
factories Resource event model 2018-08-01 08:58:49 +00:00
features Merge branch 'rails5-fix-flaky-spec-user-uses-shortcuts' into 'master' 2018-08-01 10:40:07 +00:00
finders Add specs for label search backend code 2018-07-31 12:46:37 +03:00
fixtures ensure that merge request widget serializer exposes `can_create_issue` 2018-07-31 11:02:21 +02:00
graphql Add mutation toggling WIP state of merge requests 2018-07-25 18:37:12 +02:00
helpers Resolve "The comparison list for the modified icons" 2018-07-27 09:27:20 +00:00
initializers Migrate storage nesting check to Gitaly 2018-06-27 16:20:03 +00:00
javascripts Merge branch 'winh-lint-console-tests' into 'master' 2018-07-31 19:03:19 +00:00
lib Improve Ci::Status::Build specs 2018-08-01 12:25:19 +02:00
mailers Update notification specs after renaming a class 2018-07-16 13:46:00 +02:00
migrations Remove code for dynamically generating routes 2018-07-25 16:41:29 +02:00
models Respond to DB health in background migrations 2018-08-06 15:20:36 +02:00
policies Revert "Merge branch '41416-making-instance-wide-data-tools-more-accessible' into 'master'" 2018-07-27 13:12:35 +00:00
presenters Add specs for unsupported runner 2018-08-01 12:25:19 +02:00
requests Merge branch 'fix-multiple-scopes' into 'master' 2018-08-01 11:38:32 +00:00
routing Revert "Merge branch '41416-making-instance-wide-data-tools-more-accessible' into 'master'" 2018-07-27 13:12:35 +00:00
rubocop/cop Merge branch 'update-large-tables-cop' into 'master' 2018-06-22 13:22:15 +00:00
serializers Remove code for dynamically generating routes 2018-07-25 16:41:29 +02:00
services Merge branch 'timeouted' into 'master' 2018-08-01 13:18:52 +00:00
sidekiq/cron
support Resolve "Allow issue's Internal ID (`iid`) to be set when creating via the API" 2018-08-01 09:03:14 +00:00
tasks Add local project uploads cleanup task 2018-07-31 11:09:42 -07:00
unicorn
uploaders Fix filename for accelerated uploads 2018-07-18 14:21:32 +00:00
validators
views DNS Prefetching + Preconnect of assets_host (CDN Domain) 2018-07-26 15:00:18 +00:00
workers Respond to DB health in background migrations 2018-08-06 15:20:36 +02:00
factories_spec.rb
fast_spec_helper.rb
rails_helper.rb
rake_helper.rb
simplecov_env.rb
spec_helper.rb Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00