Write-ahead log repository creations
Gitaly's TransactionManager
should handle repository creations.
Right now, the repositories can be atomically moved into place once they've been successfully created. This however requires a separate synchronization mechanism to ensure only one goroutine is creating the repository. We should handle repository creations also in TransactionManager
which would naturally synchronize the repository creation due to the single writer semantics.
The TransactionManager
currently expects the repository to exist. This is also a natural point to update the logic to return a proper error if any other changes are attempted prior to the repository being created.