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
00e9525b
Commit
00e9525b
authored
Jul 09, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
70257497
6e106f66
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
11 deletions
+18
-11
app/assets/javascripts/vue_shared/directives/tooltip.js
app/assets/javascripts/vue_shared/directives/tooltip.js
+4
-0
lib/gitlab/gitaly_client.rb
lib/gitlab/gitaly_client.rb
+12
-11
spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb
spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb
+2
-0
No files found.
app/assets/javascripts/vue_shared/directives/tooltip.js
View file @
00e9525b
...
@@ -3,8 +3,12 @@ import '~/commons/bootstrap';
...
@@ -3,8 +3,12 @@ import '~/commons/bootstrap';
export
default
{
export
default
{
bind
(
el
)
{
bind
(
el
)
{
const
glTooltipDelay
=
localStorage
.
getItem
(
'
gl-tooltip-delay
'
);
const
delay
=
glTooltipDelay
?
JSON
.
parse
(
glTooltipDelay
)
:
0
;
$
(
el
).
tooltip
({
$
(
el
).
tooltip
({
trigger
:
'
hover
'
,
trigger
:
'
hover
'
,
delay
,
});
});
},
},
...
...
lib/gitlab/gitaly_client.rb
View file @
00e9525b
...
@@ -388,20 +388,21 @@ module Gitlab
...
@@ -388,20 +388,21 @@ module Gitlab
end
end
def
self
.
can_use_disk?
(
storage
)
def
self
.
can_use_disk?
(
storage
)
cached_value
=
MUTEX
.
synchronize
do
false
@can_use_disk
||=
{}
# cached_value = MUTEX.synchronize do
@can_use_disk
[
storage
]
# @can_use_disk ||= {}
end
# @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
)
#
gitaly_filesystem_id = filesystem_id(storage)
direct_filesystem_id
=
filesystem_id_from_disk
(
storage
)
#
direct_filesystem_id = filesystem_id_from_disk(storage)
MUTEX
.
synchronize
do
#
MUTEX.synchronize do
@can_use_disk
[
storage
]
=
gitaly_filesystem_id
.
present?
&&
#
@can_use_disk[storage] = gitaly_filesystem_id.present? &&
gitaly_filesystem_id
==
direct_filesystem_id
#
gitaly_filesystem_id == direct_filesystem_id
end
#
end
end
end
def
self
.
filesystem_id
(
storage
)
def
self
.
filesystem_id
(
storage
)
...
...
spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb
View file @
00e9525b
...
@@ -30,6 +30,7 @@ describe Gitlab::Git::RuggedImpl::UseRugged, :seed_helper do
...
@@ -30,6 +30,7 @@ describe Gitlab::Git::RuggedImpl::UseRugged, :seed_helper do
end
end
it
'returns true when gitaly matches disk'
do
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
expect
(
subject
.
use_rugged?
(
repository
,
feature_flag_name
)).
to
be
true
end
end
...
@@ -48,6 +49,7 @@ describe Gitlab::Git::RuggedImpl::UseRugged, :seed_helper do
...
@@ -48,6 +49,7 @@ describe Gitlab::Git::RuggedImpl::UseRugged, :seed_helper do
end
end
it
"doesn't lead to a second rpc call because gitaly client should use the cached value"
do
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
(
subject
.
use_rugged?
(
repository
,
feature_flag_name
)).
to
be
true
expect
(
Gitlab
::
GitalyClient
).
not_to
receive
(
:filesystem_id
)
expect
(
Gitlab
::
GitalyClient
).
not_to
receive
(
:filesystem_id
)
...
...
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