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 +4 -4
- data/lib/redis_client/cluster/errors.rb +2 -2
- data/lib/redis_client/cluster/optimistic_locking.rb +1 -1
- data/lib/redis_client/cluster/pipeline.rb +1 -1
- data/lib/redis_client/cluster/pub_sub.rb +2 -3
- data/lib/redis_client/cluster/router.rb +3 -3
- data/lib/redis_client/cluster/transaction.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f72e0ed5a40d8d663d00a29ffb43ec046d911c73e514fa709f907eaf59d2e751
|
4
|
+
data.tar.gz: 442e3c7ef0e59dbef1950eb661aaf4441226927d4c871ae9a81824b33c456c4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
173
|
+
elsif err.message.start_with?('CLUSTERDOWN')
|
174
174
|
@router.renew_cluster_state if @watching_slot.nil?
|
175
175
|
raise err
|
176
176
|
else
|