From acb6222caf5adcae6911151048b267af52a52e57 Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Fri, 26 Aug 2022 13:16:50 +0800 Subject: [PATCH] Revert "DEV: Upgrade Redis to 4.8" (#18099) This reverts commit 0b5a0fd857a56e19834d52c9b5e2927c60f68771. Pending release of Sidekiq 6.5.6 so that we don't get depreciation warnings --- Gemfile.lock | 6 +++--- lib/discourse_redis.rb | 4 ++-- spec/lib/discourse_redis_spec.rb | 20 -------------------- 3 files changed, 5 insertions(+), 25 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index c9e68c59991..5afb684dac8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -229,7 +229,7 @@ GEM logstash-event (1.2.02) logstash-logger (0.26.1) logstash-event (~> 1.2) - logster (2.11.3) + logster (2.11.2) loofah (2.18.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) @@ -375,7 +375,7 @@ GEM msgpack (>= 0.4.3) optimist (>= 3.0.0) rchardet (1.8.0) - redis (4.8.0) + redis (4.7.1) redis-namespace (1.9.0) redis (>= 4) regexp_parser (2.5.0) @@ -643,4 +643,4 @@ DEPENDENCIES yaml-lint BUNDLED WITH - 2.3.20 + 2.3.18 diff --git a/lib/discourse_redis.rb b/lib/discourse_redis.rb index 4c661cc9afe..0230eaf006a 100644 --- a/lib/discourse_redis.rb +++ b/lib/discourse_redis.rb @@ -50,8 +50,8 @@ class DiscourseRedis :hdel, :hexists, :hget, :hgetall, :hincrby, :hincrbyfloat, :hkeys, :hlen, :hmget, :hmset, :hset, :hsetnx, :hvals, :incr, :incrby, :incrbyfloat, :lindex, :linsert, :llen, :lpop, :lpush, :lpushx, :lrange, :lrem, :lset, :ltrim, :mapped_hmset, :mapped_hmget, :mapped_mget, :mapped_mset, :mapped_msetnx, :move, :mset, - :msetnx, :persist, :pexpire, :pexpireat, :psetex, :pttl, :rename, :renamenx, :rpop, :rpoplpush, :rpush, :rpushx, :sadd, :sadd?, :scard, - :sdiff, :set, :setbit, :setex, :setnx, :setrange, :sinter, :sismember, :smembers, :sort, :spop, :srandmember, :srem, :srem?, :strlen, + :msetnx, :persist, :pexpire, :pexpireat, :psetex, :pttl, :rename, :renamenx, :rpop, :rpoplpush, :rpush, :rpushx, :sadd, :scard, + :sdiff, :set, :setbit, :setex, :setnx, :setrange, :sinter, :sismember, :smembers, :sort, :spop, :srandmember, :srem, :strlen, :sunion, :ttl, :type, :watch, :zadd, :zcard, :zcount, :zincrby, :zrange, :zrangebyscore, :zrank, :zrem, :zremrangebyrank, :zremrangebyscore, :zrevrange, :zrevrangebyscore, :zrevrank, :zrangebyscore, :dump, :restore].each do |m| diff --git a/spec/lib/discourse_redis_spec.rb b/spec/lib/discourse_redis_spec.rb index 952ad61157f..e6564abc56e 100644 --- a/spec/lib/discourse_redis_spec.rb +++ b/spec/lib/discourse_redis_spec.rb @@ -113,26 +113,6 @@ RSpec.describe DiscourseRedis do expect(redis.mget('key1', 'key2')).to eq(['1', '2']) expect(redis.scan_each.to_a).to contain_exactly('key1', 'key2') end - - describe '#sadd?' do - it "should send the right command with the right key prefix to redis" do - redis = DiscourseRedis.new - - redis.without_namespace.expects(:sadd?).with("default:testset", "1") - - redis.sadd?("testset", "1") - end - end - - describe '#srem?' do - it "should send the right command with the right key prefix to redis" do - redis = DiscourseRedis.new - - redis.without_namespace.expects(:srem?).with("default:testset", "1") - - redis.srem?("testset", "1") - end - end end describe 'when namespace is disabled' do