Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c96381a1
Commit
c96381a1
authored
Jul 19, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
16ef8208
eb3f465e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
changelogs/unreleased/sh-fix-gitaly-server-info-cache.yml
changelogs/unreleased/sh-fix-gitaly-server-info-cache.yml
+5
-0
lib/gitlab/gitaly_client.rb
lib/gitlab/gitaly_client.rb
+1
-1
spec/lib/gitlab/gitaly_client_spec.rb
spec/lib/gitlab/gitaly_client_spec.rb
+13
-0
No files found.
changelogs/unreleased/sh-fix-gitaly-server-info-cache.yml
0 → 100644
View file @
c96381a1
---
title
:
Fix Gitaly auto-detection caching
merge_request
:
30954
author
:
type
:
performance
lib/gitlab/gitaly_client.rb
View file @
c96381a1
...
...
@@ -392,7 +392,7 @@ module Gitlab
@can_use_disk
[
storage
]
end
return
cached_value
if
cached_value
.
present
?
return
cached_value
unless
cached_value
.
nil
?
gitaly_filesystem_id
=
filesystem_id
(
storage
)
direct_filesystem_id
=
filesystem_id_from_disk
(
storage
)
...
...
spec/lib/gitlab/gitaly_client_spec.rb
View file @
c96381a1
...
...
@@ -119,6 +119,19 @@ describe Gitlab::GitalyClient do
end
end
describe
'.can_use_disk?'
do
it
'properly caches a false result'
do
# spec_helper stubs this globally
allow
(
described_class
).
to
receive
(
:can_use_disk?
).
and_call_original
expect
(
described_class
).
to
receive
(
:filesystem_id
).
once
expect
(
described_class
).
to
receive
(
:filesystem_id_from_disk
).
once
2
.
times
do
described_class
.
can_use_disk?
(
'unknown'
)
end
end
end
describe
'.connection_data'
do
it
'returns connection data'
do
address
=
'tcp://localhost:9876'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment