summaryrefslogtreecommitdiff
path: root/config/initializers/7_redis.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/initializers/7_redis.rb')
-rw-r--r--config/initializers/7_redis.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/config/initializers/7_redis.rb b/config/initializers/7_redis.rb
index 84aa231089b..50f0fb92317 100644
--- a/config/initializers/7_redis.rb
+++ b/config/initializers/7_redis.rb
@@ -1,5 +1,11 @@
# frozen_string_literal: true
+# We set the instance variable directly to suppress warnings.
+# We cannot switch to the new behavior until we change all existing `redis.exists` calls to `redis.exists?`.
+# Some gems also need to be updated
+# https://gitlab.com/gitlab-org/gitlab/-/issues/340602
+Redis.instance_variable_set(:@exists_returns_integer, false)
+
Redis::Client.prepend(Gitlab::Instrumentation::RedisInterceptor)
# Make sure we initialize a Redis connection pool before multi-threaded
@@ -11,3 +17,5 @@ Gitlab::Redis::Cache.with { nil }
Gitlab::Redis::Queues.with { nil }
Gitlab::Redis::SharedState.with { nil }
Gitlab::Redis::TraceChunks.with { nil }
+Gitlab::Redis::RateLimiting.with { nil }
+Gitlab::Redis::Sessions.with { nil }