Commit 91f2a41c authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'mk/avoid-redundant-lfs-object-delete-events' into 'master'

Geo: Avoid duplicate LFS object delete events and jobs

See merge request gitlab-org/gitlab!60757
parents 9281e2e4 f9aae8f1
......@@ -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
---
name: geo_lfs_object_replication
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56286
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/276694
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/329697
milestone: '13.11'
type: development
group: group::geo
......
......@@ -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