Handle repository creations, deletions and renames atomically
Compare changes
- Sami Hiltunen authored
Praefect currently handles RenameRepository like every other mutator. This is problematic as Praefect ends up renaming repositories first on the disks of the Gitalys and then in the database. If only the first operation succeeds, Praefect has effectively lost track of the repositories. With Praefect now generating unique relative paths for each repository, there's no need to actually move the repositories on the disks anymore. It is sufficient to rename the repository only in the database and leave the replicas in their existing locations on disk. This commit intercepts RenameRepository in Praefect and renames repositories only in the database. Changelog: fixed
internal/praefect/rename_repository.go
0 → 100644
+ 50
− 0