Commit 7f36ad87 authored by Mike Kozono's avatar Mike Kozono

Geo: Avoid redundant LFS delete events and jobs

parent bacd7dc6
......@@ -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
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment