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
91b7cf3e
Commit
91b7cf3e
authored
Sep 27, 2021
by
Jonathan Schafer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix DB load balance autoloading/code-reloading
Changelog: changed
parent
5a53744e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
lib/gitlab/database/load_balancing/sidekiq_client_middleware.rb
...tlab/database/load_balancing/sidekiq_client_middleware.rb
+3
-3
No files found.
lib/gitlab/database/load_balancing/sidekiq_client_middleware.rb
View file @
91b7cf3e
...
@@ -35,12 +35,12 @@ module Gitlab
...
@@ -35,12 +35,12 @@ module Gitlab
# connection.load_balancer.primary_write_location
# connection.load_balancer.primary_write_location
# end
# end
#
#
job
[
'wal_locations'
]
=
{
Gitlab
::
Database
::
MAIN_DATABASE_NAME
.
to_sym
=>
wal_location
}
if
wal_location
job
[
'wal_locations'
]
=
{
::
Gitlab
::
Database
::
MAIN_DATABASE_NAME
.
to_sym
=>
wal_location
}
if
wal_location
end
end
def
wal_location
def
wal_location
strong_memoize
(
:wal_location
)
do
strong_memoize
(
:wal_location
)
do
if
Session
.
current
.
use_primary?
if
::
Gitlab
::
Database
::
LoadBalancing
::
Session
.
current
.
use_primary?
load_balancer
.
primary_write_location
load_balancer
.
primary_write_location
else
else
load_balancer
.
host
.
database_replica_location
load_balancer
.
host
.
database_replica_location
...
@@ -49,7 +49,7 @@ module Gitlab
...
@@ -49,7 +49,7 @@ module Gitlab
end
end
def
load_balancer
def
load_balancer
LoadBalancing
.
proxy
.
load_balancer
::
Gitlab
::
Database
::
LoadBalancing
.
proxy
.
load_balancer
end
end
end
end
end
end
...
...
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