redis_failover 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Changes.md CHANGED
@@ -1,3 +1,8 @@
1
+ 1.0.1
2
+ -----------
3
+ - Bumped required dependency on ZK gem. ZK 1.7.4 fixes a critical bug with locking (see https://github.com/slyphon/zk/issues/54)
4
+ - Fix an issue where a failover would not occur if we couldn't check the role of a downed master
5
+
1
6
  1.0.0
2
7
  -----------
3
8
  ** NOTE: This version of redis_failover requires that you upgrade your clients and Node Managers at the same time.
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![Build Status](https://secure.travis-ci.org/ryanlecompte/redis_failover.png?branch=master)](http://travis-ci.org/ryanlecompte/redis_failover)
4
4
 
5
- redis_failover attempts to provides a full automatic master/slave failover solution for Ruby. Redis does not currently provide
5
+ redis_failover provides a full automatic master/slave failover solution for Ruby. Redis does not currently provide
6
6
  an automatic failover capability when configured for master/slave replication. When the master node dies,
7
7
  a new master must be manually brought online and assigned as the slave's new master. This manual
8
8
  switch-over is not desirable in high traffic sites where Redis is a critical part of the overall
@@ -17,9 +17,9 @@ require 'redis_failover/errors'
17
17
  require 'redis_failover/client'
18
18
  require 'redis_failover/runner'
19
19
  require 'redis_failover/version'
20
- require 'redis_failover/node_strategy'
21
20
  require 'redis_failover/node_manager'
22
21
  require 'redis_failover/node_watcher'
22
+ require 'redis_failover/node_strategy'
23
23
  require 'redis_failover/node_snapshot'
24
24
  require 'redis_failover/manual_failover'
25
25
  require 'redis_failover/failover_strategy'
@@ -259,9 +259,14 @@ module RedisFailover
259
259
  # Check for case where a node previously thought to be the master was
260
260
  # somehow manually reconfigured to be a slave outside of the node manager's
261
261
  # control.
262
- if master && master.slave?
263
- raise InvalidNodeRoleError.new(master, :master, :slave)
262
+ begin
263
+ if master && master.slave?
264
+ raise InvalidNodeRoleError.new(master, :master, :slave)
265
+ end
266
+ rescue RedisFailover::NodeUnavailableError => ex
267
+ logger.warn("Failed to check whether existing master has invalid role: #{ex.inspect}")
264
268
  end
269
+
265
270
  master
266
271
  end
267
272
  rescue ZK::Exceptions::NoNode
@@ -1,3 +1,3 @@
1
1
  module RedisFailover
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
Binary file
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
18
18
  gem.add_dependency('redis', ['>= 2.2', '< 4'])
19
19
  gem.add_dependency('redis-namespace')
20
20
  gem.add_dependency('multi_json', '~> 1')
21
- gem.add_dependency('zk', ['>= 1.7.2', '< 1.8'])
21
+ gem.add_dependency('zk', ['>= 1.7.4', '< 1.8'])
22
22
 
23
23
  gem.add_development_dependency('rake')
24
24
  gem.add_development_dependency('rspec')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis_failover
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-12 00:00:00.000000000 Z
12
+ date: 2012-11-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redis
@@ -72,7 +72,7 @@ dependencies:
72
72
  requirements:
73
73
  - - ! '>='
74
74
  - !ruby/object:Gem::Version
75
- version: 1.7.2
75
+ version: 1.7.4
76
76
  - - <
77
77
  - !ruby/object:Gem::Version
78
78
  version: '1.8'
@@ -83,7 +83,7 @@ dependencies:
83
83
  requirements:
84
84
  - - ! '>='
85
85
  - !ruby/object:Gem::Version
86
- version: 1.7.2
86
+ version: 1.7.4
87
87
  - - <
88
88
  - !ruby/object:Gem::Version
89
89
  version: '1.8'
@@ -209,7 +209,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
209
209
  version: '0'
210
210
  segments:
211
211
  - 0
212
- hash: 87105057959996156
212
+ hash: -1642431998489370945
213
213
  required_rubygems_version: !ruby/object:Gem::Requirement
214
214
  none: false
215
215
  requirements:
@@ -218,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
218
  version: '0'
219
219
  segments:
220
220
  - 0
221
- hash: 87105057959996156
221
+ hash: -1642431998489370945
222
222
  requirements: []
223
223
  rubyforge_project:
224
224
  rubygems_version: 1.8.23