Skip to content

Geo: Refactor: Subsume scope by primary key for replicables

What does this MR do?

Require scoping by primary key in the replicables_for_geo_node method.

No change in behavior, and no change in queries produced by the app. All existing usages of replicables_for_geo_node already apply primary_key_in or id_in scopes, so this is only a refactor.

This refactor will allow us to apply the scope to a subquery within LfsObject.replicables_for_geo_node to improve performance, see !42423 (comment 418699307).

This refactor will also tend to ensure that replicables_for_geo_node is not accidentally used without restricting the scope.

Also this will make it clearer, when producing queries for analysis, that this scoping is always a part of any usage.

Related to #250230 (closed)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Michael Kozono

Merge request reports

Loading