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
944dafc8
Commit
944dafc8
authored
Oct 04, 2021
by
Yorick Peterse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'test-db-load-balance' into 'master'"
This reverts merge request !71212
parent
7f166104
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
.gitlab/ci/frontend.gitlab-ci.yml
.gitlab/ci/frontend.gitlab-ci.yml
+0
-2
config/initializers/load_balancing.rb
config/initializers/load_balancing.rb
+2
-2
No files found.
.gitlab/ci/frontend.gitlab-ci.yml
View file @
944dafc8
...
...
@@ -115,8 +115,6 @@ update-storybook-yarn-cache:
needs
:
[
"
setup-test-env"
,
"
retrieve-tests-metadata"
,
"
compile-test-assets"
]
variables
:
WEBPACK_VENDOR_DLL
:
"
true"
GITLAB_NO_AR_DB_PREPEND_LOAD_BALANCING
:
"
true"
GITLAB_USE_PREPARED_STATEMENTS
:
"
true"
script
:
-
run_timed_command "gem install knapsack --no-document"
-
run_timed_command "scripts/gitaly-test-spawn"
...
...
config/initializers/load_balancing.rb
View file @
944dafc8
...
...
@@ -2,7 +2,7 @@
ActiveRecord
::
Base
.
singleton_class
.
attr_accessor
:load_balancing_proxy
Gitlab
::
Database
.
main
.
disable_prepared_statements
unless
ENV
[
'GITLAB_USE_PREPARED_STATEMENTS'
]
==
'true'
Gitlab
::
Database
.
main
.
disable_prepared_statements
Gitlab
::
Application
.
configure
do
|
config
|
config
.
middleware
.
use
(
Gitlab
::
Database
::
LoadBalancing
::
RackMiddleware
)
...
...
@@ -11,7 +11,7 @@ end
# This hijacks the "connection" method to ensure both
# `ActiveRecord::Base.connection` and all models use the same load
# balancing proxy.
ActiveRecord
::
Base
.
singleton_class
.
prepend
(
Gitlab
::
Database
::
LoadBalancing
::
ActiveRecordProxy
)
unless
ENV
[
'GITLAB_NO_AR_DB_PREPEND_LOAD_BALANCING'
]
==
'true'
ActiveRecord
::
Base
.
singleton_class
.
prepend
(
Gitlab
::
Database
::
LoadBalancing
::
ActiveRecordProxy
)
# The load balancer needs to be configured immediately, and re-configured after
# forking. This ensures queries that run before forking use the load balancer,
...
...
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