Rename `Geo::RegistryFinder#fdw?` to `use_legacy_queries?`

parent 54b26296
......@@ -2,10 +2,10 @@ module Geo
class AttachmentRegistryFinder < RegistryFinder
def find_synced_attachments
relation =
if fdw?
fdw_find_synced_attachments
else
if use_legacy_queries?
legacy_find_synced_attachments
else
fdw_find_synced_attachments
end
relation
......@@ -13,10 +13,10 @@ module Geo
def find_failed_attachments
relation =
if fdw?
fdw_find_failed_attachments
else
if use_legacy_queries?
legacy_find_failed_attachments
else
fdw_find_failed_attachments
end
relation
......
......@@ -22,10 +22,10 @@ module Geo
# Selective project replication adds a wrinkle to FDW queries, so
# we fallback to the legacy version for now.
relation =
if fdw?
fdw_find_nonreplicated_lfs_objects
else
if use_legacy_queries?
legacy_find_nonreplicated_lfs_objects(except_registry_ids: except_registry_ids)
else
fdw_find_nonreplicated_lfs_objects
end
relation
......@@ -48,10 +48,10 @@ module Geo
# Selective project replication adds a wrinkle to FDW queries, so
# we fallback to the legacy version for now.
relation =
if fdw?
fdw_find_nonreplicated_uploads
else
if use_legacy_queries?
legacy_find_nonreplicated_uploads(except_registry_ids: except_registry_ids)
else
fdw_find_nonreplicated_uploads
end
relation
......
......@@ -28,10 +28,10 @@ module Geo
def find_unsynced_projects(batch_size:)
relation =
if fdw?
fdw_find_unsynced_projects
else
if use_legacy_queries?
legacy_find_unsynced_projects
else
fdw_find_unsynced_projects
end
relation.limit(batch_size)
......@@ -39,10 +39,10 @@ module Geo
def find_projects_updated_recently(batch_size:)
relation =
if fdw?
fdw_find_projects_updated_recently
else
if use_legacy_queries?
legacy_find_projects_updated_recently
else
fdw_find_projects_updated_recently
end
relation.limit(batch_size)
......
......@@ -10,10 +10,10 @@ module Geo
protected
def fdw?
def use_legacy_queries?
# Selective project replication adds a wrinkle to FDW
# queries, so we fallback to the legacy version for now.
Gitlab::Geo.fdw? && !selective_sync?
!Gitlab::Geo.fdw? || selective_sync?
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment