Add Ci::Partitions::SyncService
Ref: #454978
What does this MR do and why?
This MR does 3 things:
- Add business logic to mark current record as
active
and next record ascurrent
. - Add unique index to ensure we have only 1 current
ci_partition
- Introduce new service to switch write to a new
ci_partition
record when all conditions are satisfied
It will be executed to create new database partitions automatically.
This feature is behind a feature flag ci_partitioning_automation
.
Edited by Max Orefice