[go: up one dir, main page]

Skip to content

Ensure Sec DB remains in sync with CI mirror tables

Problem to solve

Once we have support for a dedicated sec DB we need to ensure we have some level of continuity with our core application tables. With the decomposition of the CI DB the mirror tables async approach was adopted. We should ensure we maintain similar mirroring within the Sec DB.

Proposal

Mirror projects and namespaces table to sec_project_mirrors and sec_namespace_mirrors. Mirrors for sec are similar to the mirrors for ci, and they're synchronized the same way using consistency check workers and loose foreign keys. #466288 (comment 2279233198)

sec_project_mirrors and sec_namespace_mirrors are similar to ci_project_mirrors and ci_namespaces_mirrors, except for the mirroring of additional columns. #466288 (comment 2279233198)

  • projects.archived
  • projects.delete_pending
  • namespaces.traversal_ids

sec_*_mirrors tables belong to the gitlab_sec schema the same way ci_*_mirrors table belong to the gitlab_ci schema. Mirrored data isn't shared b/w ci and sec. This is optimized for simplicy: we have a single codepath which matches the requirements of gitlab.com. #466288 (comment 2280756035)

Implementation plan

See #466288 (comment 2280807389)

Then, when the sync workers are in place,

Then, when mirrors have been backfilled,

See Decomposition: Make Ops features compatible wit... (&6379 - closed)

Edited by Fabien Catteau