Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-07 06:11:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-07 06:11:02 +0300
commit66664611361dcfcbaf99cd7c6906b99bcb16becd (patch)
tree0b0c6b2266d5e6ea24e996cf7f5cf06ad523d9df /lib/tasks/gitlab/db/lock_writes.rake
parent7e89568aa1b1c531aa34860fbd9e77d9e988b9b2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/tasks/gitlab/db/lock_writes.rake')
-rw-r--r--lib/tasks/gitlab/db/lock_writes.rake5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/tasks/gitlab/db/lock_writes.rake b/lib/tasks/gitlab/db/lock_writes.rake
index 421c6a90fdd..a856aa77abc 100644
--- a/lib/tasks/gitlab/db/lock_writes.rake
+++ b/lib/tasks/gitlab/db/lock_writes.rake
@@ -6,7 +6,8 @@ namespace :gitlab do
task lock_writes: [:environment, 'gitlab:db:validate_config'] do
Gitlab::Database::EachDatabase.each_database_connection(include_shared: false) do |connection, database_name|
schemas_for_connection = Gitlab::Database.gitlab_schemas_for_connection(connection)
- Gitlab::Database::GitlabSchema.tables_to_schema.each do |table_name, schema_name|
+
+ Gitlab::Database::LockWritesManager.tables_to_lock(connection) do |table_name, schema_name|
# TODO: https://gitlab.com/gitlab-org/gitlab/-/issues/366834
next if schema_name == :gitlab_geo
@@ -30,7 +31,7 @@ namespace :gitlab do
desc "GitLab | DB | Remove all triggers that prevents writes from all databases"
task unlock_writes: :environment do
Gitlab::Database::EachDatabase.each_database_connection do |connection, database_name|
- Gitlab::Database::GitlabSchema.tables_to_schema.each do |table_name, schema_name|
+ Gitlab::Database::LockWritesManager.tables_to_lock(connection) do |table_name, schema_name|
# TODO: https://gitlab.com/gitlab-org/gitlab/-/issues/366834
next if schema_name == :gitlab_geo