mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 02:49:29 +08:00
Revert "FIX: update Redis gem to version 4.1.3 (#8197)"
This reverts commit ab74a50d85
.
We really want to upgrade redis, but discovered some edge cases
around failover we need to test.
Holding off on the upgrade till a bit more testing happens
This commit is contained in:
parent
ab74a50d85
commit
ae2a56999e
9
Gemfile
9
Gemfile
|
@ -36,7 +36,14 @@ gem 'mail', require: false
|
||||||
gem 'mini_mime'
|
gem 'mini_mime'
|
||||||
gem 'mini_suffix'
|
gem 'mini_suffix'
|
||||||
|
|
||||||
gem 'redis', '4.1.3'
|
# holding off redis upgrade temporarily as it is having issues with our current
|
||||||
|
# freedom patch, we will follow this up.
|
||||||
|
#
|
||||||
|
# FrozenError: can't modify frozen Hash
|
||||||
|
# /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/redis-4.1.0/lib/redis/client.rb:93:in `delete'
|
||||||
|
# /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/redis-4.1.0/lib/redis/client.rb:93:in `initialize'
|
||||||
|
# /var/www/discourse/lib/freedom_patches/redis.rb:7:in `initialize'
|
||||||
|
gem 'redis', '4.0.1'
|
||||||
gem 'redis-namespace'
|
gem 'redis-namespace'
|
||||||
|
|
||||||
gem 'active_model_serializers', '~> 0.8.3'
|
gem 'active_model_serializers', '~> 0.8.3'
|
||||||
|
|
|
@ -309,7 +309,7 @@ GEM
|
||||||
msgpack (>= 0.4.3)
|
msgpack (>= 0.4.3)
|
||||||
optimist (>= 3.0.0)
|
optimist (>= 3.0.0)
|
||||||
rchardet (1.8.0)
|
rchardet (1.8.0)
|
||||||
redis (4.1.3)
|
redis (4.0.1)
|
||||||
redis-namespace (1.6.0)
|
redis-namespace (1.6.0)
|
||||||
redis (>= 3.0.4)
|
redis (>= 3.0.4)
|
||||||
request_store (1.4.1)
|
request_store (1.4.1)
|
||||||
|
@ -516,7 +516,7 @@ DEPENDENCIES
|
||||||
rb-inotify (~> 0.9)
|
rb-inotify (~> 0.9)
|
||||||
rbtrace
|
rbtrace
|
||||||
rchardet
|
rchardet
|
||||||
redis (= 4.1.3)
|
redis (= 4.0.1)
|
||||||
redis-namespace
|
redis-namespace
|
||||||
rinku
|
rinku
|
||||||
rotp
|
rotp
|
||||||
|
|
|
@ -241,6 +241,7 @@ module Discourse
|
||||||
|
|
||||||
require 'discourse_redis'
|
require 'discourse_redis'
|
||||||
require 'logster/redis_store'
|
require 'logster/redis_store'
|
||||||
|
require 'freedom_patches/redis'
|
||||||
# Use redis for our cache
|
# Use redis for our cache
|
||||||
config.cache_store = DiscourseRedis.new_redis_store
|
config.cache_store = DiscourseRedis.new_redis_store
|
||||||
$redis = DiscourseRedis.new
|
$redis = DiscourseRedis.new
|
||||||
|
|
16
lib/freedom_patches/redis.rb
Normal file
16
lib/freedom_patches/redis.rb
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
# https://github.com/redis/redis-rb/pull/591
|
||||||
|
class Redis
|
||||||
|
class Client
|
||||||
|
alias_method :old_initialize, :initialize
|
||||||
|
|
||||||
|
def initialize(options = {})
|
||||||
|
old_initialize(options)
|
||||||
|
|
||||||
|
if options.include?(:connector) && options[:connector].is_a?(Class)
|
||||||
|
@connector = options[:connector].new(@options)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user