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
ca7fc5f7
Commit
ca7fc5f7
authored
May 25, 2021
by
Terri Chu
Committed by
Mark Chao
May 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ElasticIndexerWorker in major release [RUN AS-IF-FOSS]
parent
23f945c4
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
5 additions
and
91 deletions
+5
-91
.rubocop_manual_todo.yml
.rubocop_manual_todo.yml
+0
-1
config/sidekiq_queues.yml
config/sidekiq_queues.yml
+0
-2
doc/administration/operations/extra_sidekiq_processes.md
doc/administration/operations/extra_sidekiq_processes.md
+3
-3
doc/administration/sidekiq.md
doc/administration/sidekiq.md
+1
-1
doc/integration/elasticsearch.md
doc/integration/elasticsearch.md
+1
-1
ee/app/workers/all_queues.yml
ee/app/workers/all_queues.yml
+0
-9
ee/app/workers/elastic_indexer_worker.rb
ee/app/workers/elastic_indexer_worker.rb
+0
-27
ee/spec/workers/elastic_indexer_worker_spec.rb
ee/spec/workers/elastic_indexer_worker_spec.rb
+0
-46
spec/workers/every_sidekiq_worker_spec.rb
spec/workers/every_sidekiq_worker_spec.rb
+0
-1
No files found.
.rubocop_manual_todo.yml
View file @
ca7fc5f7
...
...
@@ -2507,7 +2507,6 @@ Gitlab/NamespacedClass:
-
'
ee/app/workers/elastic_full_index_worker.rb'
-
'
ee/app/workers/elastic_index_bulk_cron_worker.rb'
-
'
ee/app/workers/elastic_index_initial_bulk_cron_worker.rb'
-
'
ee/app/workers/elastic_indexer_worker.rb'
-
'
ee/app/workers/elastic_indexing_control_worker.rb'
-
'
ee/app/workers/elastic_namespace_indexer_worker.rb'
-
'
ee/app/workers/elastic_namespace_rollout_worker.rb'
...
...
config/sidekiq_queues.yml
View file @
ca7fc5f7
...
...
@@ -120,8 +120,6 @@
-
1
-
-
elastic_full_index
-
1
-
-
elastic_indexer
-
1
-
-
elastic_indexing_control
-
1
-
-
elastic_namespace_indexer
...
...
doc/administration/operations/extra_sidekiq_processes.md
View file @
ca7fc5f7
...
...
@@ -38,11 +38,11 @@ To start multiple processes:
process, and values in each item determine the queues it works on.
For example, the following setting creates three Sidekiq processes, one to run on
`elastic_indexer`
, one to run on
`mailers`
, and one process running on all queues:
`elastic_
commit_
indexer`
, one to run on
`mailers`
, and one process running on all queues:
```
ruby
sidekiq
[
'queue_groups'
]
=
[
"elastic_indexer"
,
"elastic_
commit_
indexer"
,
"mailers"
,
"*"
]
...
...
@@ -53,7 +53,7 @@ To start multiple processes:
```
ruby
sidekiq
[
'queue_groups'
]
=
[
"elastic_
indexer, elastic_commit
_indexer"
,
"elastic_
commit_indexer, elastic_association
_indexer"
,
"mailers"
,
"*"
]
...
...
doc/administration/sidekiq.md
View file @
ca7fc5f7
...
...
@@ -26,7 +26,7 @@ you want using steps 1 and 2 from the GitLab downloads page.
## Optional: Enable extra Sidekiq processes
sidekiq_cluster
[
'enable'
]
=
true
sidekiq
[
'queue_groups'
]
=
[
"elastic_indexer"
,
"elastic_
commit_
indexer"
,
"*"
]
```
...
...
doc/integration/elasticsearch.md
View file @
ca7fc5f7
...
...
@@ -622,7 +622,7 @@ Sidekiq processes](../administration/operations/extra_sidekiq_processes.md).
This enqueues a Sidekiq job for each project that needs to be indexed.
You can view the jobs in
**Admin Area > Monitoring > Background Jobs > Queues Tab**
and click
`elastic_indexer`
, or you can query indexing status using a Rake task:
and click
`elastic_
commit_
indexer`
, or you can query indexing status using a Rake task:
```
shell
# Omnibus installations
...
...
ee/app/workers/all_queues.yml
View file @
ca7fc5f7
...
...
@@ -941,15 +941,6 @@
:weight:
1
:idempotent:
:tags: []
-
:name: elastic_indexer
:worker_name: ElasticIndexerWorker
:feature_category: :global_search
:has_external_dependencies:
:urgency: :throttled
:resource_boundary: :unknown
:weight:
1
:idempotent:
:tags: []
-
:name: elastic_indexing_control
:worker_name: ElasticIndexingControlWorker
:feature_category: :global_search
...
...
ee/app/workers/elastic_indexer_worker.rb
deleted
100644 → 0
View file @
23f945c4
# frozen_string_literal: true
# Usage of this worker is deprecated, please remove it in the next major version
class
ElasticIndexerWorker
# rubocop:disable Scalability/IdempotentWorker
include
ApplicationWorker
sidekiq_options
retry:
2
feature_category
:global_search
urgency
:throttled
loggable_arguments
0
,
1
,
4
def
perform
(
operation
,
class_name
,
record_id
,
es_id
,
options
=
{})
return
true
unless
Gitlab
::
CurrentSettings
.
elasticsearch_indexing?
klass
=
class_name
.
constantize
record
=
klass
.
find
(
record_id
)
case
operation
.
to_s
when
/index/
record
.
maintain_elasticsearch_create
when
/update/
record
.
maintain_elasticsearch_update
when
/delete/
record
.
maintain_elasticsearch_destroy
end
end
end
ee/spec/workers/elastic_indexer_worker_spec.rb
deleted
100644 → 0
View file @
23f945c4
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
ElasticIndexerWorker
do
subject
{
described_class
.
new
}
describe
'#perform'
do
context
'indexing is enabled'
do
using
RSpec
::
Parameterized
::
TableSyntax
let
(
:project
)
{
instance_double
(
Project
,
id:
1
,
es_id:
1
)
}
before
do
stub_ee_application_setting
(
elasticsearch_indexing:
true
)
expect
(
Project
).
to
receive
(
:find
).
and_return
(
project
)
end
where
(
:operation
,
:method
)
do
'index'
|
'maintain_elasticsearch_create'
'update'
|
'maintain_elasticsearch_update'
'delete'
|
'maintain_elasticsearch_destroy'
end
with_them
do
it
'calls respective methods'
do
expect
(
project
).
to
receive
(
method
.
to_sym
)
subject
.
perform
(
operation
,
'Project'
,
project
.
id
,
project
.
es_id
)
end
end
end
context
'indexing is disabled'
do
before
do
stub_ee_application_setting
(
elasticsearch_indexing:
false
)
end
it
'returns true if ES disabled'
do
expect
(
Milestone
).
not_to
receive
(
:find
).
with
(
1
)
expect
(
subject
.
perform
(
'index'
,
'Milestone'
,
1
,
1
)).
to
be_truthy
end
end
end
end
spec/workers/every_sidekiq_worker_spec.rb
View file @
ca7fc5f7
...
...
@@ -212,7 +212,6 @@ RSpec.describe 'Every Sidekiq worker' do
'ElasticCommitIndexerWorker'
=>
2
,
'ElasticDeleteProjectWorker'
=>
2
,
'ElasticFullIndexWorker'
=>
2
,
'ElasticIndexerWorker'
=>
2
,
'ElasticIndexingControlWorker'
=>
3
,
'ElasticNamespaceIndexerWorker'
=>
2
,
'ElasticNamespaceRolloutWorker'
=>
2
,
...
...
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