Skip to content

Remove orphan repository replicas

Pavlo Strokov requested to merge ps-remove-orphan-repos into master

When repository removal operation fails for secondaries for max attempts to process the job the repositories remain on the disk with no use. It happens because the entry is removed from repositories table when removal operation runs for the primary storage. That is why we should extend our reconciler to handle removal of those orphan repositories stored on the secondary gitaly nodes. Because of the delete_replica_unique_index it is possible to schedule only a single removal operation for one reconciliation run. But eventually all repositories will be removed. In order to return a single storage into proper state faster we use ordering for the scheduling, it also simplifies testing.

Closes: #3480 (closed)

Merge request reports

Loading