Skip to content
Snippets Groups Projects

Resolve "Geo: Optimize replication of project repo keep around refs"

2 files
+ 19
4
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -64,10 +64,12 @@ def keep_around(*shas)
# is when a pipeline is created. So, in this case, it is still under
# Ci::Pipeline.transaction. It's safe to skip the transaction check
# because we already wrote the refs to the repository on disk.
Sidekiq::Worker.skipping_transaction_check do
::Gitlab::EventStore.publish(
::Repositories::KeepAroundRefsCreatedEvent.new(data: { project_id: project.id })
)
if shas.compact.any?
Sidekiq::Worker.skipping_transaction_check do
::Gitlab::EventStore.publish(
::Repositories::KeepAroundRefsCreatedEvent.new(data: { project_id: project.id })
)
end
end
end
Loading