redis-cluster-client 0.11.3 → 0.11.4

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: a18bda4b076ac6a39e7558b39b0ff5f443e2f9d192ff45ee6749e64b3a349fbd
4
- data.tar.gz: ed166898e6dbb23b316d87162767fe06eb34440029bdb6f33764c58038c20d88
3
+ metadata.gz: f72e0ed5a40d8d663d00a29ffb43ec046d911c73e514fa709f907eaf59d2e751
4
+ data.tar.gz: 442e3c7ef0e59dbef1950eb661aaf4441226927d4c871ae9a81824b33c456c4e
5
5
  SHA512:
6
- metadata.gz: 7b1ca4265e58d3d4cdb00c0ad9629d72dec6c1a0681d34663e38adb147a0d66985be3f4257d6f6d0c62752cda0f710bfd9e7eb9f3694e07ec4796ce99677c148
7
- data.tar.gz: 178592be6e79bfdf2c5288f558fca21116aabd98cc10b4436298393d22f895844523b3e32f28635172229a404c55d83e52e242230677ab00d509dba7d70adc0c
6
+ metadata.gz: 3c06f2218983448bba3daef5209828aec9b236757094a9635e514519adf0757385f91c8c7d9a62a86d6eb9bf652e9b354a71c457a60208793c63ebd43c14c3d0
7
+ data.tar.gz: 523b7c8b897329260cacf1ab03ba26f917aa8dea0a78682d3aeeb8da538bed87ee482ed4f8e8db6e8f1d63649447b664cd86360f0a7e8bb554f4457d451c0946
@@ -37,8 +37,8 @@ class RedisClient
37
37
  end
38
38
 
39
39
  @errors = errors
40
- messages = @errors.map { |node_key, error| "#{node_key}: #{error.message}" }
41
- super("Errors occurred on any node: #{messages.join(', ')}")
40
+ messages = @errors.map { |node_key, error| "#{node_key}: (#{error.class}) #{error.message}" }
41
+ super(messages.join(', '))
42
42
  end
43
43
  end
44
44
 
@@ -33,7 +33,7 @@ class RedisClient
33
33
  raise
34
34
  end
35
35
  rescue ::RedisClient::CommandError => e
36
- @router.renew_cluster_state if e.message.start_with?('CLUSTERDOWN Hash slot not served')
36
+ @router.renew_cluster_state if e.message.start_with?('CLUSTERDOWN')
37
37
  raise
38
38
  end
39
39
  rescue ::RedisClient::ConnectionError
@@ -73,7 +73,7 @@ class RedisClient
73
73
  first_exception ||= result
74
74
  end
75
75
 
76
- stale_cluster_state = true if result.message.start_with?('CLUSTERDOWN Hash slot not served')
76
+ stale_cluster_state = true if result.message.start_with?('CLUSTERDOWN')
77
77
  end
78
78
 
79
79
  results[index] = result
@@ -90,11 +90,10 @@ class RedisClient
90
90
 
91
91
  case event = @queue.pop(true)
92
92
  when ::RedisClient::CommandError
93
- raise event unless event.message.start_with?('MOVED', 'CLUSTERDOWN Hash slot not served')
93
+ raise event unless event.message.start_with?('MOVED', 'CLUSTERDOWN')
94
94
 
95
95
  break start_over
96
- when ::RedisClient::ConnectionError
97
- break start_over
96
+ when ::RedisClient::ConnectionError then break start_over
98
97
  when StandardError then raise event
99
98
  when Array then break event
100
99
  end
@@ -74,7 +74,7 @@ class RedisClient
74
74
  renew_cluster_state
75
75
  raise
76
76
  rescue ::RedisClient::CommandError => e
77
- renew_cluster_state if e.message.start_with?('CLUSTERDOWN Hash slot not served')
77
+ renew_cluster_state if e.message.start_with?('CLUSTERDOWN')
78
78
  raise
79
79
  rescue ::RedisClient::Cluster::ErrorCollection => e
80
80
  raise if e.errors.any?(::RedisClient::CircuitBreaker::OpenCircuitError)
@@ -82,7 +82,7 @@ class RedisClient
82
82
  renew_cluster_state if e.errors.values.any? do |err|
83
83
  next false if ::RedisClient::Cluster::ErrorIdentification.identifiable?(err) && @node.none? { |c| ::RedisClient::Cluster::ErrorIdentification.client_owns_error?(err, c) }
84
84
 
85
- err.message.start_with?('CLUSTERDOWN Hash slot not served') || err.is_a?(::RedisClient::ConnectionError)
85
+ err.message.start_with?('CLUSTERDOWN') || err.is_a?(::RedisClient::ConnectionError)
86
86
  end
87
87
 
88
88
  raise
@@ -123,7 +123,7 @@ class RedisClient
123
123
  node.call('ASKING')
124
124
  retry
125
125
  end
126
- elsif e.message.start_with?('CLUSTERDOWN Hash slot not served')
126
+ elsif e.message.start_with?('CLUSTERDOWN')
127
127
  renew_cluster_state
128
128
  retry if retry_count >= 0
129
129
  end
@@ -170,7 +170,7 @@ class RedisClient
170
170
  elsif err.message.start_with?('ASK')
171
171
  node = @router.assign_asking_node(err.message)
172
172
  try_asking(node) ? send_transaction(node, redirect: redirect - 1) : err
173
- elsif err.message.start_with?('CLUSTERDOWN Hash slot not served')
173
+ elsif err.message.start_with?('CLUSTERDOWN')
174
174
  @router.renew_cluster_state if @watching_slot.nil?
175
175
  raise err
176
176
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-cluster-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.3
4
+ version: 0.11.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taishi Kasuga