diff options
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/git/tree.rb | 16 | ||||
-rw-r--r-- | lib/gitlab/redis/wrapper.rb | 7 |
2 files changed, 15 insertions, 8 deletions
diff --git a/lib/gitlab/git/tree.rb b/lib/gitlab/git/tree.rb index 4747ab55c63..6365ac941de 100644 --- a/lib/gitlab/git/tree.rb +++ b/lib/gitlab/git/tree.rb @@ -12,15 +12,17 @@ module Gitlab class << self # Get list of tree objects # for repository based on commit sha and path - def where( - repository, sha, path = nil, recursive = false, skip_flat_paths = true, rescue_not_found = true, - pagination_params = nil) + def tree_entries( + repository:, + sha:, + path: nil, + recursive: false, + skip_flat_paths: true, + rescue_not_found: true, + pagination_params: nil + ) path = nil if path == '' || path == '/' - tree_entries(repository, sha, path, recursive, skip_flat_paths, rescue_not_found, pagination_params) - end - - def tree_entries(repository, sha, path, recursive, skip_flat_paths, rescue_not_found, pagination_params = nil) wrapped_gitaly_errors do repository.gitaly_commit_client.tree_entries( repository, sha, path, recursive, skip_flat_paths, pagination_params) diff --git a/lib/gitlab/redis/wrapper.rb b/lib/gitlab/redis/wrapper.rb index bb231eec226..b2494c7d43c 100644 --- a/lib/gitlab/redis/wrapper.rb +++ b/lib/gitlab/redis/wrapper.rb @@ -30,7 +30,12 @@ module Gitlab end def pool - @pool ||= ConnectionPool.new(size: pool_size, name: store_name.underscore) { redis } + @pool ||= if config_fallback && + config_fallback.params.except(:instrumentation_class) == params.except(:instrumentation_class) + config_fallback.pool + else + ConnectionPool.new(size: pool_size, name: store_name.underscore) { redis } + end end def pool_size |