diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-11 21:11:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-11 21:11:13 +0300 |
commit | 2f9c0a9f2ce0063264549861f8b561b8ccc420a8 (patch) | |
tree | 8af863f05f7fbdd763a684236433847e5554269c /app/services/projects | |
parent | 442d4a496ebad9e3f76de2f570c4804e73ddd41e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/projects')
-rw-r--r-- | app/services/projects/update_repository_storage_service.rb | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/app/services/projects/update_repository_storage_service.rb b/app/services/projects/update_repository_storage_service.rb index 799ae5677c3..85fb1890fcd 100644 --- a/app/services/projects/update_repository_storage_service.rb +++ b/app/services/projects/update_repository_storage_service.rb @@ -48,13 +48,8 @@ module Projects pool_repository: pool_repository ) - checksum, new_checksum = replicate_object_pool_repository(from: pool_repository, to: target_pool_repository) - - if checksum != new_checksum - raise Error, - format(s_('UpdateRepositoryStorage|Failed to verify %{type} repository checksum from %{old} to %{new}'), - type: 'object_pool', old: checksum, new: new_checksum) - end + Repositories::ReplicateService.new(pool_repository.object_pool.repository) + .execute(target_pool_repository.object_pool.repository, :object_pool) end def remove_old_paths @@ -96,19 +91,6 @@ module Projects ) end - def replicate_object_pool_repository(from:, to:) - old_object_pool = from.object_pool - new_object_pool = to.object_pool - - checksum = old_object_pool.repository.checksum - - new_object_pool.repository.replicate(old_object_pool.repository) - - new_checksum = new_object_pool.repository.checksum - - [checksum, new_checksum] - end - def replicate_object_pool_on_move_ff_enabled? Feature.enabled?(:replicate_object_pool_on_move, project) end |