Skip to content
Snippets Groups Projects
Select Git revision
  • 510317-implement-feature-flag
  • zoekt-speed-up-scheduling-events
  • 520534-add-api-endpoints-for-wiki-comments-export-to-support-compliance-requirements
  • ic-update-import-github-repo-spec
  • master default protected
  • georgekoltsov/restartable-project-import
  • pedropombeiro/454989/registration-page-availability
  • resolve-issue-479191
  • 493768-sharding-key-not-null-approvals
  • 510995-feature-flag-rollout-of-reject_security_policy_project_deletion_groups-2-removal
  • 515035-add-admin-roles-to-roles-and-permissions-page
  • 505045-add-all-available-groups-resolver
  • julianthome/add-sast-estensions
  • 507722-vsd-be-projects-by-dora-table-improve-the-accuracy-of-the-projects-representation
  • 515973-dast-docs-timeout-explanation-diagram
  • tbulva-long-line-bug
  • 513321-remove-ff-proj-comp-filter
  • ag/469118-bso-com-notifications-copy
  • adjust-feature-settings-mutation
  • 520688-add-zoekt-info-rake-task
  • v17.7.6-ee protected
  • v17.8.4-ee protected
  • v17.9.1-ee protected
  • v17.8.3-ee protected
  • v17.7.5-ee protected
  • v17.9.0-ee protected
  • v17.9.0-rc42-ee protected
  • v17.6.5-ee protected
  • v17.7.4-ee protected
  • v17.8.2-ee protected
  • v17.6.4-ee protected
  • v17.7.3-ee protected
  • v17.8.1-ee protected
  • v17.8.0-ee protected
  • v17.7.2-ee protected
  • v17.8.0-rc42-ee protected
  • v17.5.5-ee protected
  • v17.6.3-ee protected
  • v17.7.1-ee protected
  • v17.7.0-ee protected
40 results

security_report_ingestion_overview.md

  • Michael Becker's avatar
    c96bdc59
    Create worker to store security reports by project · c96bdc59
    Michael Becker authored
    Technical context
    -----------------------
    
    `UPSERT` queries **require acquiring locks on unique index
    tuples**. This will cause lock contention if multiple processes try to
    `UPSERT` records with the same unique attributes. The lock contention
    will make each process wait for the other to complete.
    
    Historical context
    -----------------------
    
    The `StoreSecurityReportsWorker` job has the lock-contention issue
    described above. It was discovered in [this][0] production incident
    
    This Commit
    -----------------------
    
    The short-term solution resolves the lock contention by, in effect,
    making the jobs run sequentially. However, going through these jobs
    sequentially can take a long time ([somewhere][1] on the order of 3.25
    hours to 20 hours)
    
    In this change, we implement a medium-term solution that replaces the
    problematic job with a similar job that can make use of our existing
    [sidekiq deduplication][2] tooling
    
    With this change, even if a single project suddenly has many pipelines
    created for it, only one job will be scheduled and the rest will be
    de-duplicated
    
    [0]:gitlab-com/gl-infra/production#17754
    [1]:gitlab-com/gl-infra/production#17754 (comment 1831442417)
    [2]:https://docs.gitlab.com/ee/development/sidekiq/idempotent_jobs.html#deduplication
    
    related to: #452005
    
    EE: true
    Changelog: fixed
    Verified
    c96bdc59
    History
    Create worker to store security reports by project
    Michael Becker authored
    Technical context
    -----------------------
    
    `UPSERT` queries **require acquiring locks on unique index
    tuples**. This will cause lock contention if multiple processes try to
    `UPSERT` records with the same unique attributes. The lock contention
    will make each process wait for the other to complete.
    
    Historical context
    -----------------------
    
    The `StoreSecurityReportsWorker` job has the lock-contention issue
    described above. It was discovered in [this][0] production incident
    
    This Commit
    -----------------------
    
    The short-term solution resolves the lock contention by, in effect,
    making the jobs run sequentially. However, going through these jobs
    sequentially can take a long time ([somewhere][1] on the order of 3.25
    hours to 20 hours)
    
    In this change, we implement a medium-term solution that replaces the
    problematic job with a similar job that can make use of our existing
    [sidekiq deduplication][2] tooling
    
    With this change, even if a single project suddenly has many pipelines
    created for it, only one job will be scheduled and the rest will be
    de-duplicated
    
    [0]:gitlab-com/gl-infra/production#17754
    [1]:gitlab-com/gl-infra/production#17754 (comment 1831442417)
    [2]:https://docs.gitlab.com/ee/development/sidekiq/idempotent_jobs.html#deduplication
    
    related to: #452005
    
    EE: true
    Changelog: fixed
Code owners
Assign users and groups as approvers for specific file changes. Learn more.