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
7f36ad87
Commit
7f36ad87
authored
Apr 30, 2021
by
Mike Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Geo: Avoid redundant LFS delete events and jobs
parent
bacd7dc6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
ee/app/models/ee/lfs_object.rb
ee/app/models/ee/lfs_object.rb
+1
-1
ee/spec/workers/remove_unreferenced_lfs_objects_worker_spec.rb
...ec/workers/remove_unreferenced_lfs_objects_worker_spec.rb
+1
-0
No files found.
ee/app/models/ee/lfs_object.rb
View file @
7f36ad87
...
...
@@ -39,7 +39,7 @@ module EE
end
def
log_geo_deleted_event
::
Geo
::
LfsObjectDeletedEventStore
.
new
(
self
).
create!
::
Geo
::
LfsObjectDeletedEventStore
.
new
(
self
).
create!
if
::
Feature
.
disabled?
(
:geo_lfs_object_replication
)
end
end
end
ee/spec/workers/remove_unreferenced_lfs_objects_worker_spec.rb
View file @
7f36ad87
...
...
@@ -11,6 +11,7 @@ RSpec.describe RemoveUnreferencedLfsObjectsWorker do
let_it_be
(
:secondary
)
{
create
(
:geo_node
)
}
it
'logs an event to the Geo event log for every unreferenced LFS objects'
do
stub_feature_flags
(
geo_lfs_object_replication:
false
)
stub_current_geo_node
(
primary
)
unreferenced_lfs_object_1
=
create
(
:lfs_object
,
:with_file
)
unreferenced_lfs_object_2
=
create
(
:lfs_object
,
:with_file
)
...
...
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