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
76eefff9
Commit
76eefff9
authored
Apr 06, 2019
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve queries with selective sync by shard
parent
b6179a0e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
ee/app/finders/geo/project_unsynced_finder.rb
ee/app/finders/geo/project_unsynced_finder.rb
+7
-2
ee/app/finders/geo/project_updated_recently_finder.rb
ee/app/finders/geo/project_updated_recently_finder.rb
+7
-2
No files found.
ee/app/finders/geo/project_unsynced_finder.rb
View file @
76eefff9
...
...
@@ -20,8 +20,7 @@ module Geo
def
execute
return
Geo
::
Fdw
::
Project
.
none
unless
valid_shard?
current_node
.
projects
projects
.
missing_project_registry
.
within_shards
(
shard_name
)
.
limit
(
batch_size
)
...
...
@@ -32,6 +31,12 @@ module Geo
attr_reader
:current_node
,
:shard_name
,
:batch_size
def
projects
return
Geo
::
Fdw
::
Project
.
all
if
current_node
.
selective_sync_by_shards?
current_node
.
projects
end
def
valid_shard?
return
true
unless
current_node
.
selective_sync_by_shards?
...
...
ee/app/finders/geo/project_updated_recently_finder.rb
View file @
76eefff9
...
...
@@ -20,8 +20,7 @@ module Geo
def
execute
return
Geo
::
Fdw
::
Project
.
none
unless
valid_shard?
current_node
.
projects
projects
.
recently_updated
.
within_shards
(
shard_name
)
.
limit
(
batch_size
)
...
...
@@ -32,6 +31,12 @@ module Geo
attr_reader
:current_node
,
:shard_name
,
:batch_size
def
projects
return
Geo
::
Fdw
::
Project
.
all
if
current_node
.
selective_sync_by_shards?
current_node
.
projects
end
def
valid_shard?
return
true
unless
current_node
.
selective_sync_by_shards?
...
...
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