Database Migration Debugging and Cross-Database Compatibility
GitLab's data migration process for Advanced Search

GitLab's data migration process for Advanced Search

6/1/2021 · Dmitry Gruzd

What this post added

Introduced a new data migration framework for Elasticsearch indices, inspired by Rails DB migrations. This framework uses time-stamped migration files stored in Elasticsearch, automated background execution via a MigrationWorker, and supports states like 'completed', 'halted', and 'uncompleted'. It includes features like batched migrations (`batched!`), throttle delays (`throttle_delay`), pausing indexing (`pause_indexing!`), and space requirement checks (`space_requirements!`). This framework has been used to migrate issues, comments, and merge requests, improving performance.

Read the original post ↗