I couldn’t find a better way to make it work without freedom patch.
Problem is that the original Redis gem is removing :connector option (redis-rb/client.rb at master · redis/redis-rb · GitHub) We are passing that options around between retries and removing that on our end.
Our version of Connector got
def resolve(client = nil) ... options = @options.dup options.delete(:connector) client ||= Redis::Client.new(options) ... return loading ? @slave_options : @options
I checked on my local machine that with new freedom patch it is still working. Testing steps.
- run 2 instances of Redis with different ports
- stopped first Redis server
- ensured that the site is still working
- ensured we got periodic checks
DiscourseRedis::FallbackHandler: Checking connection to master server...
- Started server again
- ensured we got
DiscourseRedis::FallbackHandler: Master server is active, killing all connections to slave...