Commit d448287e authored by Dylan Griffith's avatar Dylan Griffith

Merge branch '326719-switch-bulk-cron-workers-to-replicas' into 'master'

Adds data consistency for Elastic::BulkCronWorker(s) [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!58345
parents 6020dd62 7928fb95
---
name: load_balancing_for_bulk_cron_workers
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/58345
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/326721
milestone: '13.11'
type: development
group: group::global search
default_enabled: false
......@@ -65,7 +65,7 @@
:urgency: :throttled
:resource_boundary: :unknown
:weight: 1
:idempotent: true
:idempotent:
:tags: []
- :name: cronjob:elastic_index_initial_bulk_cron
:feature_category: :global_search
......@@ -73,7 +73,7 @@
:urgency: :throttled
:resource_boundary: :unknown
:weight: 1
:idempotent: true
:idempotent:
:tags: []
- :name: cronjob:elastic_migration
:feature_category: :global_search
......
# frozen_string_literal: true
class ElasticIndexBulkCronWorker
class ElasticIndexBulkCronWorker # rubocop:disable Scalability/IdempotentWorker
include Elastic::BulkCronWorker
feature_category :global_search
idempotent!
urgency :throttled
# Even though this worker is idempotent, until https://gitlab.com/gitlab-org/gitlab/-/issues/325291 is done
# we can't use it with read-only database replicas
data_consistency :delayed, feature_flag: :load_balancing_for_bulk_cron_workers
private
......
# frozen_string_literal: true
class ElasticIndexInitialBulkCronWorker
class ElasticIndexInitialBulkCronWorker # rubocop:disable Scalability/IdempotentWorker
include Elastic::BulkCronWorker
feature_category :global_search
idempotent!
urgency :throttled
# Even though this worker is idempotent, until https://gitlab.com/gitlab-org/gitlab/-/issues/325291 is done
# we can't use it with read-only database replicas
data_consistency :delayed, feature_flag: :load_balancing_for_bulk_cron_workers
private
......
......@@ -47,4 +47,9 @@ RSpec.describe ElasticIndexBulkCronWorker do
)
end
end
it_behaves_like 'worker with data consistency',
described_class,
feature_flag: :load_balancing_for_bulk_cron_workers,
data_consistency: :delayed
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment