partition: Introduce migration framework
It is expected that all outstanding migrations are executed for a repository prior to it serving traffic. To facilitate this, before beginning a transaction, the repository is checked for outstanding migrations. If any are identified, all operations are blocked on the repository until the required migrations finish. Once complete, all repository traffic that was blocked is able to resume and start transactions.
To coordinate migrations on a single partition, partition.migrationManager is introduced. It ensures that only a single migration is run at a time and handles blocking concurrent requests to the same repository.
Related: #5758 (closed)
Edited by Justin Tobler