Revert "DEV: Upgrade Redis to 4.8" (#18099)

This reverts commit 0b5a0fd857.

Pending release of Sidekiq 6.5.6 so that we don't get depreciation
warnings
This commit is contained in:
Alan Guo Xiang Tan 2022-08-26 13:16:50 +08:00 committed by GitHub
parent 80fce67150
commit acb6222caf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 25 deletions

View File

@ -229,7 +229,7 @@ GEM
logstash-event (1.2.02) logstash-event (1.2.02)
logstash-logger (0.26.1) logstash-logger (0.26.1)
logstash-event (~> 1.2) logstash-event (~> 1.2)
logster (2.11.3) logster (2.11.2)
loofah (2.18.0) loofah (2.18.0)
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.5.9) nokogiri (>= 1.5.9)
@ -375,7 +375,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.8.0) redis (4.7.1)
redis-namespace (1.9.0) redis-namespace (1.9.0)
redis (>= 4) redis (>= 4)
regexp_parser (2.5.0) regexp_parser (2.5.0)
@ -643,4 +643,4 @@ DEPENDENCIES
yaml-lint yaml-lint
BUNDLED WITH BUNDLED WITH
2.3.20 2.3.18

View File

@ -50,8 +50,8 @@ class DiscourseRedis
:hdel, :hexists, :hget, :hgetall, :hincrby, :hincrbyfloat, :hkeys, :hlen, :hmget, :hmset, :hset, :hsetnx, :hvals, :incr, :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, :incrby, :incrbyfloat, :lindex, :linsert, :llen, :lpop, :lpush, :lpushx, :lrange, :lrem, :lset, :ltrim,
:mapped_hmset, :mapped_hmget, :mapped_mget, :mapped_mset, :mapped_msetnx, :move, :mset, :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, :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, :srem?, :strlen, :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, :sunion, :ttl, :type, :watch, :zadd, :zcard, :zcount, :zincrby, :zrange, :zrangebyscore, :zrank, :zrem, :zremrangebyrank,
:zremrangebyscore, :zrevrange, :zrevrangebyscore, :zrevrank, :zrangebyscore, :zremrangebyscore, :zrevrange, :zrevrangebyscore, :zrevrank, :zrangebyscore,
:dump, :restore].each do |m| :dump, :restore].each do |m|

View File

@ -113,26 +113,6 @@ RSpec.describe DiscourseRedis do
expect(redis.mget('key1', 'key2')).to eq(['1', '2']) expect(redis.mget('key1', 'key2')).to eq(['1', '2'])
expect(redis.scan_each.to_a).to contain_exactly('key1', 'key2') expect(redis.scan_each.to_a).to contain_exactly('key1', 'key2')
end 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 end
describe 'when namespace is disabled' do describe 'when namespace is disabled' do