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
5c363893
Commit
5c363893
authored
Oct 12, 2021
by
Lee Tickett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix undefined method `use_primary!' error in GDK
Changelog: fixed
parent
5288c4ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lib/gitlab/database/load_balancing/sticking.rb
lib/gitlab/database/load_balancing/sticking.rb
+4
-4
No files found.
lib/gitlab/database/load_balancing/sticking.rb
View file @
5c363893
...
...
@@ -74,7 +74,7 @@ module Gitlab
def
unstick_or_continue_sticking
(
namespace
,
id
)
return
if
all_caught_up?
(
namespace
,
id
)
Session
.
current
.
use_primary!
::
Gitlab
::
Database
::
LoadBalancing
::
Session
.
current
.
use_primary!
end
# Select a replica that has caught up with the primary. If one has not been
...
...
@@ -83,14 +83,14 @@ module Gitlab
replica_selected
=
select_caught_up_replicas
(
namespace
,
id
)
Session
.
current
.
use_primary!
unless
replica_selected
::
Gitlab
::
Database
::
LoadBalancing
::
Session
.
current
.
use_primary!
unless
replica_selected
end
# Starts sticking to the primary for the given namespace and id, using
# the latest WAL pointer from the primary.
def
stick
(
namespace
,
id
)
mark_primary_write_location
(
namespace
,
id
)
Session
.
current
.
use_primary!
::
Gitlab
::
Database
::
LoadBalancing
::
Session
.
current
.
use_primary!
end
def
bulk_stick
(
namespace
,
ids
)
...
...
@@ -100,7 +100,7 @@ module Gitlab
end
end
Session
.
current
.
use_primary!
::
Gitlab
::
Database
::
LoadBalancing
::
Session
.
current
.
use_primary!
end
def
with_primary_write_location
...
...
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