Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7928fb95
Commit
7928fb95
authored
Apr 01, 2021
by
Dmitry Gruzd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add data consistency for Elastic::BulkCronWorker
parent
1166c2b8
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
6 deletions
+23
-6
config/feature_flags/development/load_balancing_for_bulk_cron_workers.yml
...lags/development/load_balancing_for_bulk_cron_workers.yml
+8
-0
ee/app/workers/all_queues.yml
ee/app/workers/all_queues.yml
+2
-2
ee/app/workers/elastic_index_bulk_cron_worker.rb
ee/app/workers/elastic_index_bulk_cron_worker.rb
+4
-2
ee/app/workers/elastic_index_initial_bulk_cron_worker.rb
ee/app/workers/elastic_index_initial_bulk_cron_worker.rb
+4
-2
ee/spec/workers/elastic_index_bulk_cron_worker_spec.rb
ee/spec/workers/elastic_index_bulk_cron_worker_spec.rb
+5
-0
No files found.
config/feature_flags/development/load_balancing_for_bulk_cron_workers.yml
0 → 100644
View file @
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
ee/app/workers/all_queues.yml
View file @
7928fb95
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
:urgency: :throttled
:urgency: :throttled
:resource_boundary: :unknown
:resource_boundary: :unknown
:weight:
1
:weight:
1
:idempotent:
true
:idempotent:
:tags: []
:tags: []
-
:name: cronjob:elastic_index_initial_bulk_cron
-
:name: cronjob:elastic_index_initial_bulk_cron
:feature_category: :global_search
:feature_category: :global_search
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
:urgency: :throttled
:urgency: :throttled
:resource_boundary: :unknown
:resource_boundary: :unknown
:weight:
1
:weight:
1
:idempotent:
true
:idempotent:
:tags: []
:tags: []
-
:name: cronjob:elastic_migration
-
:name: cronjob:elastic_migration
:feature_category: :global_search
:feature_category: :global_search
...
...
ee/app/workers/elastic_index_bulk_cron_worker.rb
View file @
7928fb95
# frozen_string_literal: true
# frozen_string_literal: true
class
ElasticIndexBulkCronWorker
class
ElasticIndexBulkCronWorker
# rubocop:disable Scalability/IdempotentWorker
include
Elastic
::
BulkCronWorker
include
Elastic
::
BulkCronWorker
feature_category
:global_search
feature_category
:global_search
idempotent!
urgency
:throttled
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
private
...
...
ee/app/workers/elastic_index_initial_bulk_cron_worker.rb
View file @
7928fb95
# frozen_string_literal: true
# frozen_string_literal: true
class
ElasticIndexInitialBulkCronWorker
class
ElasticIndexInitialBulkCronWorker
# rubocop:disable Scalability/IdempotentWorker
include
Elastic
::
BulkCronWorker
include
Elastic
::
BulkCronWorker
feature_category
:global_search
feature_category
:global_search
idempotent!
urgency
:throttled
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
private
...
...
ee/spec/workers/elastic_index_bulk_cron_worker_spec.rb
View file @
7928fb95
...
@@ -47,4 +47,9 @@ RSpec.describe ElasticIndexBulkCronWorker do
...
@@ -47,4 +47,9 @@ RSpec.describe ElasticIndexBulkCronWorker do
)
)
end
end
end
end
it_behaves_like
'worker with data consistency'
,
described_class
,
feature_flag: :load_balancing_for_bulk_cron_workers
,
data_consistency: :delayed
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment