Add trigger indexing worker
What does this MR do and why?
Related to #434590 (closed)
Behind a feature flag
Makes the gitlab:elastic:index
rake task asynchronous through a new worker
Screenshots or screen recordings
N/A
How to set up and validate locally
- setup gdk for elasticsearch
- start elasticsearch
gdk start elasticsearch
- index everything, this will use the old method
bundle exec rake gitlab:elastic:index
- Go to Admin Area > Settings > Advanced Search to enable Elasticsearch.
-
Elasticsearch indexing
andSearch with Elasticsearch enabled
should be checked
-
- confirm search works and is using Advanced search (should see a message:
Advanced search is enabled
) - enable the feature flag
echo "Feature.enable(:elastic_index_use_trigger_indexing)" | gdk rails c
- re-run the rake task
bundle exec rake gitlab:elastic:index
- confirm the worker runs successfully in the sidekiq logs
- can also check status in **Admin Area > Settings > Advanced Search > Indexing status
- confirm search works and is using Advanced search (should see a message:
Advanced search is enabled
)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Terri Chu