Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
979be967
Commit
979be967
authored
Aug 04, 2020
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Geo::RegsitryFinder#current_node_fdw method
Since GitLab 13.2 we don't rely on FDW query/models
parent
a0adf4a2
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
20 deletions
+18
-20
ee/app/finders/geo/container_repository_registry_finder.rb
ee/app/finders/geo/container_repository_registry_finder.rb
+8
-2
ee/app/finders/geo/design_registry_finder.rb
ee/app/finders/geo/design_registry_finder.rb
+1
-1
ee/app/finders/geo/file_registry_finder.rb
ee/app/finders/geo/file_registry_finder.rb
+1
-1
ee/app/finders/geo/lfs_object_registry_finder.rb
ee/app/finders/geo/lfs_object_registry_finder.rb
+6
-2
ee/app/finders/geo/registry_finder.rb
ee/app/finders/geo/registry_finder.rb
+2
-12
ee/spec/finders/geo/file_registry_finder_spec.rb
ee/spec/finders/geo/file_registry_finder_spec.rb
+0
-2
No files found.
ee/app/finders/geo/container_repository_registry_finder.rb
View file @
979be967
...
...
@@ -3,7 +3,7 @@
module
Geo
class
ContainerRepositoryRegistryFinder
<
RegistryFinder
def
count_syncable
c
urrent_node_non_fdw
.
c
ontainer_repositories
.
count
container_repositories
.
count
end
def
count_synced
...
...
@@ -19,7 +19,7 @@ module Geo
end
def
find_registry_differences
(
range
)
source_ids
=
c
urrent_node_non_fdw
.
c
ontainer_repositories
.
id_in
(
range
).
pluck_primary_key
source_ids
=
container_repositories
.
id_in
(
range
).
pluck_primary_key
tracked_ids
=
Geo
::
ContainerRepositoryRegistry
.
pluck_model_ids_in_range
(
range
)
untracked_ids
=
source_ids
-
tracked_ids
...
...
@@ -63,5 +63,11 @@ module Geo
.
limit
(
batch_size
)
end
# rubocop:enable CodeReuse/ActiveRecord
private
def
container_repositories
current_node
.
container_repositories
end
end
end
ee/app/finders/geo/design_registry_finder.rb
View file @
979be967
...
...
@@ -66,7 +66,7 @@ module Geo
private
def
designs
current_node
_non_fdw
.
designs
current_node
.
designs
end
def
registries
...
...
ee/app/finders/geo/file_registry_finder.rb
View file @
979be967
...
...
@@ -151,7 +151,7 @@ module Geo
end
def
local_storage_only?
!
current_node
(
fdw:
false
)
&
.
sync_object_storage
!
current_node
&
.
sync_object_storage
end
end
end
ee/app/finders/geo/lfs_object_registry_finder.rb
View file @
979be967
...
...
@@ -3,13 +3,17 @@
module
Geo
class
LfsObjectRegistryFinder
<
FileRegistryFinder
def
replicables
lfs_objects
=
current_node
(
fdw:
false
).
lfs_objects
local_storage_only?
?
lfs_objects
.
with_files_stored_locally
:
lfs_objects
end
def
syncable
Geo
::
LfsObjectRegistry
end
private
def
lfs_objects
current_node
.
lfs_objects
end
end
end
ee/app/finders/geo/registry_finder.rb
View file @
979be967
...
...
@@ -14,18 +14,8 @@ module Geo
private
def
current_node
(
fdw:
true
)
fdw
?
current_node_fdw
:
current_node_non_fdw
end
def
current_node_fdw
strong_memoize
(
:current_node_fdw
)
do
Geo
::
Fdw
::
GeoNode
.
find
(
current_node_id
)
if
current_node_id
end
end
def
current_node_non_fdw
strong_memoize
(
:current_node_non_fdw
)
do
def
current_node
strong_memoize
(
:current_node
)
do
GeoNode
.
find
(
current_node_id
)
if
current_node_id
end
end
...
...
ee/spec/finders/geo/file_registry_finder_spec.rb
View file @
979be967
...
...
@@ -3,8 +3,6 @@
require
'spec_helper'
RSpec
.
describe
Geo
::
FileRegistryFinder
,
:geo
do
include
::
EE
::
GeoHelpers
context
'with abstract methods'
do
%w[
replicables
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment