From 5305d5267de729903474516adfe6344a7dd56a4c Mon Sep 17 00:00:00 2001 From: John Cai Date: Tue, 9 Jul 2019 09:38:03 -0700 Subject: Disabling can_use_disk? temporarily --- lib/gitlab/gitaly_client.rb | 23 +++++++++++----------- spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb | 2 ++ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/lib/gitlab/gitaly_client.rb b/lib/gitlab/gitaly_client.rb index cf0157269a8..cc9503fb6de 100644 --- a/lib/gitlab/gitaly_client.rb +++ b/lib/gitlab/gitaly_client.rb @@ -388,20 +388,21 @@ module Gitlab end def self.can_use_disk?(storage) - cached_value = MUTEX.synchronize do - @can_use_disk ||= {} - @can_use_disk[storage] - end + false + # cached_value = MUTEX.synchronize do + # @can_use_disk ||= {} + # @can_use_disk[storage] + # end - return cached_value unless cached_value.nil? + # return cached_value unless cached_value.nil? - gitaly_filesystem_id = filesystem_id(storage) - direct_filesystem_id = filesystem_id_from_disk(storage) + # gitaly_filesystem_id = filesystem_id(storage) + # direct_filesystem_id = filesystem_id_from_disk(storage) - MUTEX.synchronize do - @can_use_disk[storage] = gitaly_filesystem_id.present? && - gitaly_filesystem_id == direct_filesystem_id - end + # MUTEX.synchronize do + # @can_use_disk[storage] = gitaly_filesystem_id.present? && + # gitaly_filesystem_id == direct_filesystem_id + # end end def self.filesystem_id(storage) diff --git a/spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb b/spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb index f957ed00945..e7ef9d08f80 100644 --- a/spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb +++ b/spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb @@ -30,6 +30,7 @@ describe Gitlab::Git::RuggedImpl::UseRugged, :seed_helper do end it 'returns true when gitaly matches disk' do + pending('temporary disabled because of https://gitlab.com/gitlab-org/gitlab-ce/issues/64338') expect(subject.use_rugged?(repository, feature_flag_name)).to be true end @@ -48,6 +49,7 @@ describe Gitlab::Git::RuggedImpl::UseRugged, :seed_helper do end it "doesn't lead to a second rpc call because gitaly client should use the cached value" do + pending('temporary disabled because of https://gitlab.com/gitlab-org/gitlab-ce/issues/64338') expect(subject.use_rugged?(repository, feature_flag_name)).to be true expect(Gitlab::GitalyClient).not_to receive(:filesystem_id) -- cgit v1.2.1