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>2021-08-19 12:08:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 12:08:42 +0300
commitb76ae638462ab0f673e5915986070518dd3f9ad3 (patch)
treebdab0533383b52873be0ec0eb4d3c66598ff8b91 /app/workers/database
parent434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff)
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'app/workers/database')
-rw-r--r--app/workers/database/batched_background_migration_worker.rb3
-rw-r--r--app/workers/database/drop_detached_partitions_worker.rb18
-rw-r--r--app/workers/database/partition_management_worker.rb3
3 files changed, 22 insertions, 2 deletions
diff --git a/app/workers/database/batched_background_migration_worker.rb b/app/workers/database/batched_background_migration_worker.rb
index 5a326a351e8..0750ff1acaf 100644
--- a/app/workers/database/batched_background_migration_worker.rb
+++ b/app/workers/database/batched_background_migration_worker.rb
@@ -4,7 +4,8 @@ module Database
class BatchedBackgroundMigrationWorker
include ApplicationWorker
- sidekiq_options retry: 3
+ data_consistency :always
+
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :database
diff --git a/app/workers/database/drop_detached_partitions_worker.rb b/app/workers/database/drop_detached_partitions_worker.rb
new file mode 100644
index 00000000000..f9c8ce57a36
--- /dev/null
+++ b/app/workers/database/drop_detached_partitions_worker.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+module Database
+ class DropDetachedPartitionsWorker
+ include ApplicationWorker
+ include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
+
+ feature_category :database
+ data_consistency :always
+ idempotent!
+
+ def perform
+ Gitlab::Database::Partitioning::DetachedPartitionDropper.new.perform
+ ensure
+ Gitlab::Database::Partitioning::PartitionMonitoring.new.report_metrics
+ end
+ end
+end
diff --git a/app/workers/database/partition_management_worker.rb b/app/workers/database/partition_management_worker.rb
index c9b1cd6d261..a203c76558a 100644
--- a/app/workers/database/partition_management_worker.rb
+++ b/app/workers/database/partition_management_worker.rb
@@ -4,9 +4,10 @@ module Database
class PartitionManagementWorker
include ApplicationWorker
- sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
+ data_consistency :always
+
feature_category :database
idempotent!