diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2019-02-22 14:51:27 +0000 |
---|---|---|
committer | James Lopez <james@gitlab.com> | 2019-02-22 14:51:27 +0000 |
commit | c00a1ec093367b0a56b1085a119e776f503bed02 (patch) | |
tree | b044791423842447018f8d573e7a584142059fee /lib/gitlab/shell.rb | |
parent | b569e76c15af91d3cf953394428a50662287a16a (diff) | |
download | gitlab-ce-c00a1ec093367b0a56b1085a119e776f503bed02.tar.gz |
Only allow 30 RPCs per test case to Gitaly
Prior to this change, 35 Gitaly RPCs were allowed. But recently there's
been a renewed interest in performance. By lowering the number of
calls new N + 1's will pop up.
Later commits will add blocks to ignore the raised errors, followed by
an issue for each to be fixed.
Diffstat (limited to 'lib/gitlab/shell.rb')
-rw-r--r-- | lib/gitlab/shell.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/gitlab/shell.rb b/lib/gitlab/shell.rb index 1153e69d3de..c7d8dfcd495 100644 --- a/lib/gitlab/shell.rb +++ b/lib/gitlab/shell.rb @@ -280,7 +280,10 @@ module Gitlab # add_namespace("default", "gitlab") # def add_namespace(storage, name) - Gitlab::GitalyClient::NamespaceService.new(storage).add(name) + # https://gitlab.com/gitlab-org/gitlab-ce/issues/58012 + Gitlab::GitalyClient.allow_n_plus_1_calls do + Gitlab::GitalyClient::NamespaceService.new(storage).add(name) + end rescue GRPC::InvalidArgument => e raise ArgumentError, e.message end |