Commit 7096af19 authored by Valery Sizov's avatar Valery Sizov

Merge branch 'es_add_explanation_comments' into 'master'

[ES] Add explanation comments



See merge request !650
parents 76c26cab a19c93a6
...@@ -36,7 +36,13 @@ class ElasticIndexerWorker ...@@ -36,7 +36,13 @@ class ElasticIndexerWorker
clear_project_indexes(record_id) if klass == Project clear_project_indexes(record_id) if klass == Project
end end
rescue Elasticsearch::Transport::Transport::Errors::NotFound, ActiveRecord::RecordNotFound rescue Elasticsearch::Transport::Transport::Errors::NotFound, ActiveRecord::RecordNotFound
true # Less work to do! # These errors can happen in several cases, including:
# - A record is updated, then removed before the update is handled
# - Indexing is enabled, but not every item has been indexed yet - updating
# and deleting the un-indexed records will raise exception
#
# We can ignore these.
true
end end
private private
......
# Create a separate process, which does not load the Rails environment, to index
# each repository. This prevents memory leaks in the indexer from affecting the
# rest of the application.
module Gitlab module Gitlab
module Elastic module Elastic
class Indexer class Indexer
......
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