Skip to content

Geo: Stop moving repos to the `failed_geo_sync` dir

Problem

RenameRepository (move a repository to another path) is problematic for Gitaly, and can lead to customer problems especially when used at a high rate, so we should avoid using it if possible.

One of the usages is during "redownload" of a repo which has failed to sync many times. Immediately before moving a repo in a temporary path into the "canonical" path, we move the "canonical" repo to the @failed-geo-sync directory. This move was done to backup the repository in case a later step failed.

However, if a later step fails, then the sync is marked failed, and retried later. On the next retry, that "backed-up" repo is removed. Also, most people are unaware of it and it's very difficult to retrieve the backup. So this backup has very little value.

This issue is intended to remove the move to the @failed-geo-sync directory.

Proposal

  • In Geo::RepositoryBaseSyncService, instead of moving the current repo to the @failed-geo-sync directory, remove the current repo. Use an FF like stop_moving_repo_to_failed_geo_sync. Weight 1
  • In Geo::FrameworkRepositorySyncService, copy the changes. Weight 0
  • In rollout issue, validate on non-development environment. Then default FF on. Weight 1
  • Remove FF and cleanup, after at least 1 release. Weight 0
Edited by Michael Kozono