summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-07-19 06:10:05 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-19 06:10:05 +0000
commit7f12b2dc7406ceb8a9b1bbd730b38ad70fc88405 (patch)
treec858f594d572c4eafc741425ad04e88eae95269e /lib/tasks
parent7747c98443fd19821e89b3107fd784b417fe6216 (diff)
downloadgitlab-ce-7f12b2dc7406ceb8a9b1bbd730b38ad70fc88405.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/gitlab/db.rake2
-rw-r--r--lib/tasks/gitlab/db/lock_writes.rake6
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/tasks/gitlab/db.rake b/lib/tasks/gitlab/db.rake
index 84de21ea102..5ed54bb6921 100644
--- a/lib/tasks/gitlab/db.rake
+++ b/lib/tasks/gitlab/db.rake
@@ -94,7 +94,7 @@ namespace :gitlab do
connection = Gitlab::Database.database_base_models['main'].connection
databases_loaded << configure_database(connection)
else
- Gitlab::Database.database_base_models.each do |name, model|
+ Gitlab::Database.database_base_models_with_gitlab_shared.each do |name, model|
next unless databases_with_tasks.any? { |db_with_tasks| db_with_tasks.name == name }
databases_loaded << configure_database(model.connection, database_name: name)
diff --git a/lib/tasks/gitlab/db/lock_writes.rake b/lib/tasks/gitlab/db/lock_writes.rake
index b57c2860fe3..3a083036781 100644
--- a/lib/tasks/gitlab/db/lock_writes.rake
+++ b/lib/tasks/gitlab/db/lock_writes.rake
@@ -11,6 +11,9 @@ namespace :gitlab do
schemas_for_connection = Gitlab::Database.gitlab_schemas_for_connection(connection)
Gitlab::Database::GitlabSchema.tables_to_schema.each do |table_name, schema_name|
+ # TODO: https://gitlab.com/gitlab-org/gitlab/-/issues/366834
+ next if schema_name == :gitlab_geo
+
if schemas_for_connection.include?(schema_name.to_sym)
drop_write_trigger(database_name, connection, table_name)
else
@@ -24,6 +27,9 @@ namespace :gitlab do
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|
+ # TODO: https://gitlab.com/gitlab-org/gitlab/-/issues/366834
+ next if schema_name == :gitlab_geo
+
drop_write_trigger(database_name, connection, table_name)
end
drop_write_trigger_function(connection)