redis-client 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c3b26d6232b408310d32fda820a8d89263dccd3d3af1ab9518f2f398fdcb94c5
4
- data.tar.gz: af204813327a82cf9a80dd22ee7b5528f67df200765561bcb0e399bdd5b0e829
3
+ metadata.gz: 2b3a285f6dbfb718f7fa429e962dbb955f3109cf67d785869076c8f0407d7d45
4
+ data.tar.gz: e7e56c056e9eaabc96e438474c70bd2a3ff46a386c28cc891c4b13acbd255492
5
5
  SHA512:
6
- metadata.gz: 3754bcdfb70484753fb67e69cbc0b071eb7dacbef67a48edb59dd55a8c79094a84b3ca96caa7f0f8ac0969ce24433688d81eba2bca3b27be79bb60600a1ff1a8
7
- data.tar.gz: 998dd6e7b0cf8d92880b473aee858f19e3bff1da2ce670f4c4fae3e43e2f534a8cf2cdd1aca064036bc7c20cea660ad69d3611d80c15f5679ca78bef1747e637
6
+ metadata.gz: 0f70dfa045ca15360ba86f18cfa278a98296531b20b661a39abc8788091ff34f5407ec084e48fac45e1a2362f9741512ab35bfcc93d3fd16b3170fd188c57373
7
+ data.tar.gz: eee07f8f34ba002f46201e50d2d72ff6f05192ccaa06ae23e952bde1008f2b33783afda48ac37ad70d512619395ac442d129d305adf78c17eced954edd9922fa
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Unreleased
2
2
 
3
+ # 0.6.2
4
+
5
+ - Fix sentinel to not connected to s_down or o_down replicas.
6
+
3
7
  # 0.6.1
4
8
 
5
9
  - Fix `REDIS_REPLY_SET` parsing in `hiredis`.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- redis-client (0.6.1)
4
+ redis-client (0.6.2)
5
5
  connection_pool
6
6
 
7
7
  GEM
@@ -116,10 +116,13 @@ class RedisClient
116
116
  def resolve_replica
117
117
  each_sentinel do |sentinel_client|
118
118
  replicas = sentinel_client.call("SENTINEL", "replicas", @name, &@to_list_of_hash)
119
+ replicas.reject! do |r|
120
+ flags = r["flags"].to_s.split(",")
121
+ flags.include?("s_down") || flags.include?("o_down")
122
+ end
119
123
  next if replicas.empty?
120
124
 
121
- replica = replicas.reject { |r| r["flags"].to_s.split(",").include?("disconnected") }.sample
122
- replica ||= replicas.sample
125
+ replica = replicas.sample
123
126
  return Config.new(host: replica["ip"], port: Integer(replica["port"]), **@client_config)
124
127
  end
125
128
  rescue ConnectionError
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class RedisClient
4
- VERSION = "0.6.1"
4
+ VERSION = "0.6.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-16 00:00:00.000000000 Z
11
+ date: 2022-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool