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
d7b6221e
Commit
d7b6221e
authored
Feb 06, 2020
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch '37456-track-memory-usage-of-redis-cached-diffs' into 'master'"
This reverts merge request !24224
parent
ed300684
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
13 deletions
+0
-13
lib/gitlab/diff/highlight_cache.rb
lib/gitlab/diff/highlight_cache.rb
+0
-6
spec/lib/gitlab/diff/highlight_cache_spec.rb
spec/lib/gitlab/diff/highlight_cache_spec.rb
+0
-7
No files found.
lib/gitlab/diff/highlight_cache.rb
View file @
d7b6221e
...
...
@@ -93,8 +93,6 @@ module Gitlab
#
redis
.
expire
(
key
,
EXPIRATION
)
end
record_metrics
(
redis
.
memory
(
"USAGE"
,
key
))
end
# Subsequent read_file calls would need the latest cache.
...
...
@@ -103,10 +101,6 @@ module Gitlab
clear_memoization
(
:cacheable_files
)
end
def
record_metrics
(
memory_usage
)
self
.
class
.
gitlab_redis_diff_caching_memory_usage_bytes
.
observe
({},
memory_usage
)
end
def
file_paths
strong_memoize
(
:file_paths
)
do
diff_files
.
collect
(
&
:file_path
)
...
...
spec/lib/gitlab/diff/highlight_cache_spec.rb
View file @
d7b6221e
...
...
@@ -101,13 +101,6 @@ describe Gitlab::Diff::HighlightCache, :clean_gitlab_redis_cache do
let
(
:paths
)
{
merge_request
.
diffs
.
raw_diff_files
.
select
(
&
:text?
).
map
(
&
:file_path
)
}
end
it
'updates memory usage metrics'
do
expect
(
described_class
.
gitlab_redis_diff_caching_memory_usage_bytes
)
.
to
receive
(
:observe
).
and_call_original
cache
.
send
(
:write_to_redis_hash
,
diff_hash
)
end
context
'different diff_collections for the same diffable'
do
before
do
cache
.
write_if_empty
...
...
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