The `ReplicateRepository` GRPC should automatically clean up after itself when it encounters an error
The ReplicateRepository
GRPC should automatically clean up after itself when it encounters an error.
Currently, errors appear to get sort of eaten, and the invoking Rails process never notified about the failure.
This results in a bad state, with a project repository only partially replicated to the destination gitaly storage shard file system.
In any case, once the underlying problem is fixed, that is all well and good.
However, to future-proof against other unknown and as yet unencountered errors, the ReplicateRepository
GRPC implementation should include an unwind/rollback step which is ensured to be invoked when any error is encountered.
This would also significantly unblock our current process, and would allow us to get back into the business of spinning through large numbers of project replications as part of storage shard re-balancing operations.
The failed replica repo should never matter, since the original repository should remain untouched, as defined by the scope of the ReplicateRepository
GRPC method implementation.