Skip to content

Enable transactions for ReplicateRepository

Sami Hiltunen requested to merge smh-replicate-repository-tx into master

ReplicateRepository is the last RPC that should be handled transactionally but isn't. This commit enables transactions for ReplicateRepository.

The general repository replication functionality of the RPC works. The repository is created, objects, references and custom hooks replicated as expected.

Replicating object pool memberships doesn't work with transactions and is thus disabled. Transactions do not support writing into multiple repositories. To replicate the pool as well, we'd have to possibly commit changes to the pool, and to the target itself. Alternatively we could run multiple transactions in the handler. This requires deeper integration with transactions though and wouldn't be atomic. The functionality is thus disabled and work to support it deferred for later. Disabling the behavior shouldn't matter for the current goal of enabling transactions in Rails' and QA pipelines and deploying them on staging. Forks can still be replicated but with worse performance and more storage use.

Replicating configuration and attributes file would also not work. We don't in practice write into these files anymore though. There will be an eventual migration to remove all of the remaining attributes files.

Closes #5274 (closed)

Merge request reports