Drop reindexing leftovers only if exclusive lease is granted
What does this MR do and why?
This fixes the issue when parallel running process will delete indexes that are being reindexed at the same time.
Leftovers cleanup is moved to Gitlab::Database::Reindexing::Coordinator
so that both reindexing and cleanup can use the same lease key.
Related to #337907 (closed).
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.
Related to #337907 (closed)
Edited by Krasimir Angelov