Skip to content

Add LFS object replication using SSF [RUN ALL RSPEC] [RUN AS-IF-FOSS]

Ian Baum requested to merge lfs-ssf-behind-feature-flag into master

What does this MR do?

Enables LFS replication using SSF behind a feature flag

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #276696 (closed)

Database

LfsObjectRegistryFinder

  • Query:

    SELECT
      "lfs_object_registry".*
    FROM
      "lfs_object_registry"
    ORDER BY
      "lfs_object_registry"."id" ASC
  • Query with id:

    SELECT
      "lfs_object_registry".*
    FROM
      "lfs_object_registry"
    WHERE
      "lfs_object_registry"."id" IN (10, 100, 1000)
    ORDER BY
      "lfs_object_registry"."id" ASC
  • Plan:

    QUERY PLAN                                                                    
    ------------------------------------------------------------------------------------------------------ -------------------------------------------
    Index Scan using lfs_object_registry_pkey on lfs_object_registry  (cost=0.29..16.91 rows=3 width=116) 
    (actual time=0.329..0.350 rows=3 loops=1)
       Index Cond: (id = ANY ('{10,100,1000}'::bigint[]))
       Buffers: shared hit=11
     Planning Time: 0.808 ms
     Execution Time: 0.394 ms
    (5 rows)

LfsObject

  • Query:

    SELECT
      "lfs_objects".*
    FROM
      "lfs_objects"
    WHERE
      "lfs_objects".\id " BETWEEN 1 AND 10000
  • Plan

                          QUERY PLAN
    -------------------------------------------------------------
    Seq Scan on lfs_objects  (cost=0.00..1.06 rows=1 width=158)
       Filter: (id = 1)
    (2 rows)
Edited by Ian Baum

Merge request reports