Skip to content

Fix `NULL` insert attempts for `missing_on_primary`

Michael Kozono requested to merge mk/geo/fix-error-during-failed-download into master

What does this MR do?

When a file download response is 404 without a response body, or a non-200-or-404, then we currently attempt to save NULL for missing_on_primary. This errors due to the not null constraint on the field.

What is the impact of the bug on 10.7?

The only source of artifact 404s that are not missing-on-primary that I am aware of is: artifacts that have been migrated to object storage before the secondary has synced them.

This will generate Sentry errors and errors in geo.log.

Each sidekiq job will retry 3 times before disappearing.

With the bug fixed, the artifact sync will be tracked as failed, and then periodically retried until MigratedLocalFilesCleanUpWorker deletes the tracking record.

TL;DR the impact is noise in Sentry and geo.log.

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

  • Changelog entry added, if necessary
  • Documentation created/updated
  • API support added
  • Tests added for this feature/bug
  • Review
    • Has been reviewed by UX
    • Has been reviewed by Frontend
    • Has been reviewed by Backend
    • Has been reviewed by Database
  • EE specific content should be in the top level /ee folder
  • Conform by the merge request performance guides
  • Conform by the style guides
  • Squashed related commits together
  • Internationalization required/considered
  • If paid feature, have we considered GitLab.com plan and how it works for groups and is there a design for promoting it to users who aren't on the correct plan
  • End-to-end tests pass (package-qa manual pipeline job)

What are the relevant issue numbers?

Resolves https://gitlab.com/gitlab-org/gitlab-ee/issues/5727

Edited by Michael Kozono

Merge request reports

Loading