From 35b9274f12f29524855237bfdcd864497d62de95 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Tue, 2 Apr 2019 13:20:26 +0000 Subject: Stop calling UnlinkRepositoryFromObjectPool RPC Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/59777. In earlier iterations of our implementation of Git object deduplication we thought we would be making extensive use of Git remotes in pool repositories in the future, and that we should manage these remotes carefully from the start. We now expect we only care about one remote, namely the source project. The other remotes are there only for forensic purposes. Before this MR we tried to also remove pool remotes when member projects got deleted, with the UnlinkRepositoryFromObjectPool RPC. This is fragile when there are race conditions (see https://gitlab.com/gitlab-org/gitaly/issues/1568#note_153955926). We have spent some time making this RPC less fragile in https://gitlab.com/gitlab-org/gitaly/merge_requests/1151 but looking at this problem again, I think we should just stop calling it. --- lib/gitlab/gitaly_client/object_pool_service.rb | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'lib/gitlab/gitaly_client/object_pool_service.rb') diff --git a/lib/gitlab/gitaly_client/object_pool_service.rb b/lib/gitlab/gitaly_client/object_pool_service.rb index 6e7ede5fd18..ce1fb4d68ae 100644 --- a/lib/gitlab/gitaly_client/object_pool_service.rb +++ b/lib/gitlab/gitaly_client/object_pool_service.rb @@ -33,16 +33,6 @@ module Gitlab GitalyClient.call(storage, :object_pool_service, :link_repository_to_object_pool, request, timeout: GitalyClient.fast_timeout) end - - def unlink_repository(repository) - request = Gitaly::UnlinkRepositoryFromObjectPoolRequest.new( - object_pool: object_pool, - repository: repository.gitaly_repository - ) - - GitalyClient.call(storage, :object_pool_service, :unlink_repository_from_object_pool, - request, timeout: GitalyClient.fast_timeout) - end end end end -- cgit v1.2.3