• Stan Hu's avatar
    Decrease WebHooks::LogExecutionWorker retries · dfeb0e69
    Stan Hu authored
    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
    dfeb0e69
every_sidekiq_worker_spec.rb 22.6 KB