Commit dfeb0e69 authored by Stan Hu's avatar Stan Hu

Decrease WebHooks::LogExecutionWorker retries

Since this worker can update the same row for a group or project,
retrying can exacerbate locking in the database. PostgreSQL may create a
MultiXactId as a side effect with each lock. If these IDs exceed the
working memory of the simple LRU (SLRU) cache, database queries could
get slow.

If we are unable to store the data after 3 tries then we're better off
giving up and thereby reducing contention.

Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/340272

Changelog: performance
parent eae4fd30
......@@ -7,6 +7,8 @@ module WebHooks
data_consistency :always
feature_category :integrations
urgency :low
sidekiq_options retry: 3
loggable_arguments 0, 2, 3
idempotent!
......
......@@ -452,6 +452,7 @@ RSpec.describe 'Every Sidekiq worker' do
'WaitForClusterCreationWorker' => 3,
'WebHookWorker' => 4,
'WebHooks::DestroyWorker' => 3,
'WebHooks::LogExecutionWorker' => 3,
'Wikis::GitGarbageCollectWorker' => false,
'X509CertificateRevokeWorker' => 3
}
......
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