Commit 944dafc8 authored by Yorick Peterse's avatar Yorick Peterse

Revert "Merge branch 'test-db-load-balance' into 'master'"

This reverts merge request !71212
parent 7f166104
...@@ -115,8 +115,6 @@ update-storybook-yarn-cache: ...@@ -115,8 +115,6 @@ update-storybook-yarn-cache:
needs: ["setup-test-env", "retrieve-tests-metadata", "compile-test-assets"] needs: ["setup-test-env", "retrieve-tests-metadata", "compile-test-assets"]
variables: variables:
WEBPACK_VENDOR_DLL: "true" WEBPACK_VENDOR_DLL: "true"
GITLAB_NO_AR_DB_PREPEND_LOAD_BALANCING: "true"
GITLAB_USE_PREPARED_STATEMENTS: "true"
script: script:
- run_timed_command "gem install knapsack --no-document" - run_timed_command "gem install knapsack --no-document"
- run_timed_command "scripts/gitaly-test-spawn" - run_timed_command "scripts/gitaly-test-spawn"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
ActiveRecord::Base.singleton_class.attr_accessor :load_balancing_proxy 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| Gitlab::Application.configure do |config|
config.middleware.use(Gitlab::Database::LoadBalancing::RackMiddleware) config.middleware.use(Gitlab::Database::LoadBalancing::RackMiddleware)
...@@ -11,7 +11,7 @@ end ...@@ -11,7 +11,7 @@ end
# This hijacks the "connection" method to ensure both # This hijacks the "connection" method to ensure both
# `ActiveRecord::Base.connection` and all models use the same load # `ActiveRecord::Base.connection` and all models use the same load
# balancing proxy. # 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 # The load balancer needs to be configured immediately, and re-configured after
# forking. This ensures queries that run before forking use the load balancer, # forking. This ensures queries that run before forking use the load balancer,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment