Commit 18f3def5 authored by Dylan Griffith's avatar Dylan Griffith

Link Elasticsearch indexing progress to elastic_commit_indexer

This was previously linking to `elastic_full_index`. Looking at the size
of the `elastic_full_index` queue is much less valuable considering it
is ultimately just spinning up a bunch of `elastic_commit_indexer` jobs
which do all the heavy lifting and it's very likely the
`elastic_full_index` queue is drained in seconds (since there is no back
pressure) while the `elastic_commit_indexer` queue takes days to finish
draining.

There are also other queues at play which are indexing non-code
documents (eg. issues) but from experience these are drained quicker
than the `elastic_commit_indexer` queue when indexing projects so if we
had to pick one queue then `elastic_commit_indexer` is the best one to
show.

We could consider something more sophisticated in future but I wanted to
correct this for now since the `elastic_full_index` queue is not a
useful way to track progress.
parent 88a3cf8b
......@@ -8,7 +8,7 @@ class Admin::ElasticsearchController < Admin::ApplicationController
::Elastic::IndexProjectsService.new.execute
notice = _('Elasticsearch indexing started')
queue_link = helpers.link_to(_('(check progress)'), sidekiq_path + '/queues/elastic_full_index')
queue_link = helpers.link_to(_('(check progress)'), sidekiq_path + '/queues/elastic_commit_indexer')
flash[:notice] = "#{notice} #{queue_link}".html_safe
else
flash[:warning] = _('Please create an index before enabling indexing')
......
---
title: Link Elasticsearch indexing progress to elastic_commit_indexer
merge_request: 40928
author:
type: changed
......@@ -18,7 +18,7 @@ RSpec.describe Admin::ElasticsearchController do
post :enqueue_index
expect(controller).to set_flash[:notice].to include('/admin/sidekiq/queues/elastic_full_index')
expect(controller).to set_flash[:notice].to include('/admin/sidekiq/queues/elastic_commit_indexer')
expect(response).to redirect_to general_admin_application_settings_path(anchor: 'js-elasticsearch-settings')
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