zero-downtime Elasticsearch re-indexing
Allow for versioned Elasticsearch indexes:
After https://gitlab.com/gitlab-org/gitlab-ee/issues/328, #12548 (closed) are done, we should be able to add more than one Elasticsearch schema/search code, so we're ready to allow zero-downtime reindexing. The tasks involve:
-
#12555 (closed) This is when we add the table
es_indexes(name, is_active, progress)
On every data updates we would update every active index. While the last index is in the process of building we could use the next-oldest active one. The idea would be for only two indexes to ever be active, the current one and the one being migrated to. -
https://gitlab.com/gitlab-org/gitlab-ee/issues/12622 UI control for this
-
We can also consider taking advantage of index aliases to specify which index we use for searches, but we still need to send updates to all active indexes -
Document how the zero-downtime indexing operation works