redis-elasticache 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/lib/redis/elasticache/failover.rb +6 -2
- data/lib/redis/elasticache/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 2b7bd6bcce6dd8e60cfb6713b12e266d19ea1d89daa620a3cf0cfc0a8132c733
|
|
4
|
+
data.tar.gz: 44ed6e3acae5636421987cc2dd7d6aeafd2f607f26606a0a3f30c2b330379e79
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 64160ba02b483c108b07b9f15c92d16f9b63e57db83e8b4bb65abf3fee7ea3ae9a3689aa0471b9bb67a691d45be72c6437552b9e2a905368f17a8644b4e1e526
|
|
7
|
+
data.tar.gz: 14ebb85c2b8c3a2dabe6865e12f0acd43228d1e3c450cc8a874cbbdc97c0334121bccf7000c9fa9b91c495af9510eda6311a34492e3752ae8a018a267a1c2641
|
|
@@ -5,8 +5,10 @@ class Redis
|
|
|
5
5
|
module Connection
|
|
6
6
|
class Ruby
|
|
7
7
|
|
|
8
|
-
ELASTICACHE_READONLY_ERROR = "READONLY You can't write against a read only
|
|
9
|
-
|
|
8
|
+
ELASTICACHE_READONLY_ERROR = "READONLY You can't write against a read only replica.".freeze
|
|
9
|
+
ELASTICACHE_LOADING_ERROR = "LOADING Redis is loading the dataset in memory".freeze
|
|
10
|
+
ELASTICACHE_READONLY_MESSAGE = "A write operation was issued to an ELASTICACHE replica node that is READONLY.".freeze
|
|
11
|
+
ELASTICACHE_LOADING_MESSAGE = "A write operation was issued to an ELASTICACHE node that was previously READONLY and is now LOADING.".freeze
|
|
10
12
|
|
|
11
13
|
# Amazon RDS supports failover, but because it uses DNS magic to point to
|
|
12
14
|
# the master node, TCP connections are not disconnected and we can issue
|
|
@@ -19,6 +21,8 @@ class Redis
|
|
|
19
21
|
error_message = line.strip
|
|
20
22
|
if error_message == ELASTICACHE_READONLY_ERROR
|
|
21
23
|
raise BaseConnectionError, ELASTICACHE_READONLY_MESSAGE
|
|
24
|
+
elsif error_message == ELASTICACHE_LOADING_ERROR
|
|
25
|
+
raise BaseConnectionError, ELASTICACHE_LOADING_MESSAGE
|
|
22
26
|
else
|
|
23
27
|
CommandError.new(error_message)
|
|
24
28
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: redis-elasticache
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Craig McNamara
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2019-03-22 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: redis
|
|
@@ -109,8 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
110
|
version: '0'
|
|
111
111
|
requirements: []
|
|
112
|
-
|
|
113
|
-
rubygems_version: 2.5.1
|
|
112
|
+
rubygems_version: 3.0.2
|
|
114
113
|
signing_key:
|
|
115
114
|
specification_version: 4
|
|
116
115
|
summary: Adds missing support for AWS Elasticache to the redis-rb gem.
|