Commit 7c7fdd07 authored by Stan Hu's avatar Stan Hu

Re-enable RequestStore by default in Sidekiq

https://gitlab.com/gitlab-org/gitlab/merge_requests/20291 accidentally
made the `RequestStore` Sidekiq middleware disabled by default instead
of enabled by default. This will cause a performance regression in
Sidekiq jobs. For example, the Markdown cache will not be used.

For now, we default the `REQUEST_STORE` environment variable to 1. In
the future, we should consider just dropping this environment variable.

Discovered in
https://gitlab.com/gitlab-org/gitlab/merge_requests/19759#note_250602320
parent 5bb90b56
......@@ -31,7 +31,7 @@ enable_json_logs = Gitlab.config.sidekiq.log_format == 'json'
enable_sidekiq_memory_killer = ENV['SIDEKIQ_MEMORY_KILLER_MAX_RSS'].to_i.nonzero?
use_sidekiq_daemon_memory_killer = ENV["SIDEKIQ_DAEMON_MEMORY_KILLER"].to_i.nonzero?
use_sidekiq_legacy_memory_killer = !use_sidekiq_daemon_memory_killer
use_request_store = ENV['SIDEKIQ_REQUEST_STORE'].to_i.nonzero?
use_request_store = ENV.fetch('SIDEKIQ_REQUEST_STORE', 1).to_i.nonzero?
Sidekiq.configure_server do |config|
config.redis = queues_config_hash
......
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