From ab40c7e3c85438e4a429b289c96dc747a2603141 Mon Sep 17 00:00:00 2001 From: "Jacob Vosmaer (GitLab)" Date: Mon, 11 Jun 2018 10:39:23 +0000 Subject: [PATCH] Move gitaly_blame, gitaly_count_commits, gitaly_commit_count to opt-out --- changelogs/unreleased/gitaly-commit-count-opt-out.yml | 5 +++++ lib/gitlab/git/blame.rb | 2 +- lib/gitlab/git/repository.rb | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 changelogs/unreleased/gitaly-commit-count-opt-out.yml diff --git a/changelogs/unreleased/gitaly-commit-count-opt-out.yml b/changelogs/unreleased/gitaly-commit-count-opt-out.yml new file mode 100644 index 00000000000..fd8298b1d7b --- /dev/null +++ b/changelogs/unreleased/gitaly-commit-count-opt-out.yml @@ -0,0 +1,5 @@ +--- +title: Move some Gitaly RPC's to opt-out +merge_request: 19591 +author: +type: other diff --git a/lib/gitlab/git/blame.rb b/lib/gitlab/git/blame.rb index 4158d50cd9e..40b65f6c0da 100644 --- a/lib/gitlab/git/blame.rb +++ b/lib/gitlab/git/blame.rb @@ -22,7 +22,7 @@ module Gitlab private def load_blame - raw_output = @repo.gitaly_migrate(:blame) do |is_enabled| + raw_output = @repo.gitaly_migrate(:blame, status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled| if is_enabled load_blame_by_gitaly else diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index 93f9adaf1f1..63e1102f686 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -533,7 +533,7 @@ module Gitlab def count_commits(options) count_commits_options = process_count_commits_options(options) - gitaly_migrate(:count_commits) do |is_enabled| + gitaly_migrate(:count_commits, status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled| if is_enabled count_commits_by_gitaly(count_commits_options) else @@ -738,7 +738,7 @@ module Gitlab # # Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/330 def commit_count(ref) - gitaly_migrate(:commit_count) do |is_enabled| + gitaly_migrate(:commit_count, status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled| if is_enabled gitaly_commit_client.commit_count(ref) else