Draft: Add CI partitioning creation automation
Ref: #454976 (closed)
What does this MR do and why?
This MR explores how we can automatically creates new partition for CI tables.
Testing
Open a new console and run the following commands:
- Have existing partition records in your environment
- Enable the feature flag
- Reduce
Ci::Partition::MAX_PARTITION_SIZE
to a lower value ( eg:1.byte
) - Run
sync_partitions
command to create new partition
=> Ci::Partition.create!(id: 100, status: 4)
=> Ci::Partition.create!(id: 101, status: 3)
=> Feature.enable(:ci_partitioning_automation)
=> Ci::Partition.next!
=> Ci::Partition.next.prepare!
=> Gitlab::Database::Partitioning.sync_partitions
=> Ci::Partition.next.ready!
Edited by Max Orefice