Commit 1ec103fc authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch 'revert-fe980078' into 'master'

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

See merge request gitlab-org/gitlab!71669
parents e0a2255c 944dafc8
...@@ -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