Commit a19c93a6 authored by Valery Sizov's avatar Valery Sizov

Add explanation comments

parent 4fd3c46a
......@@ -27,7 +27,13 @@ class ElasticIndexerWorker
clear_project_indexes(record_id) if klass == Project
end
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
def update_issue_notes(record, changed_fields)
......
# 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 Elastic
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