Commit 066e01de authored by Jan Provaznik's avatar Jan Provaznik

Merge branch 'gitaly-2108-repos-really-gc-after-move' into 'master'

Do git gc, not repack, after moving a repository between shards

See merge request gitlab-org/gitlab!21502
parents 2272251b 57373d44
......@@ -92,13 +92,14 @@ module Projects
end
# The underlying FetchInternalRemote call uses a `git fetch` to move data
# to the new repository, which leaves it in a less-well-packed state and
# lacking bitmaps. Housekeeping will boost performance significantly.
# to the new repository, which leaves it in a less-well-packed state,
# lacking bitmaps and commit graphs. Housekeeping will boost performance
# significantly.
def enqueue_housekeeping
return unless Gitlab::CurrentSettings.housekeeping_enabled?
return unless Feature.enabled?(:repack_after_shard_migration, project)
Projects::HousekeepingService.new(project, :full_repack).execute
Projects::HousekeepingService.new(project, :gc).execute
rescue Projects::HousekeepingService::LeaseTaken
# No action required
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment