Skip to content

Add timeout option to elasticsearch-indexer

Dmitry Gruzd requested to merge 323856-add-timeout-flag into main

This MR implements a process-wide timeout, which is configurable with the --timeout option.

This timeout value will be passed in from the Sidekiq worker that spawns the process. We don't expect this timeout to frequently be activated but, instead, we're using this as a last resort because we have a timeout on our Redis lock used to prevent indexing the same project twice. In the rare event that indexing actually takes longer than 1 day to complete we believe it is better to kill the process than to allow the lock to be expired and therefore end up indexing the project twice in parallel since indexing it twice in parallel will cause more problems and will not be clear to operators what is going wrong.

gitlab#323856 (closed)

Screenshots

Screenshot_2021-05-26_at_13.23.19

Edited by Dmitry Gruzd

Merge request reports