redis_failover 0.9.7 → 0.9.7.1

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.
data/Changes.md CHANGED
@@ -1,3 +1,7 @@
1
+ 0.9.7.1
2
+ -----------
3
+ - Stop repeated attempts to acquire exclusive lock in Node Manager (#36)
4
+
1
5
  0.9.7
2
6
  -----------
3
7
  - Stubbed Client#client to return itself, fixes a fork reconnect bug with Resque (dbalatero)
@@ -95,6 +95,9 @@ module RedisFailover
95
95
  logger.info('Shutting down ...')
96
96
  @mutex.synchronize do
97
97
  @shutdown = true
98
+ unless @leader
99
+ reset
100
+ end
98
101
  end
99
102
  end
100
103
 
@@ -406,8 +409,12 @@ module RedisFailover
406
409
  # Executes a block wrapped in a ZK exclusive lock.
407
410
  def with_lock
408
411
  @zk_lock = @zk.locker(@lock_path)
409
- while running? && !@zk_lock.lock
410
- sleep(TIMEOUT)
412
+
413
+ begin
414
+ @zk_lock.lock!(true)
415
+ rescue Exception
416
+ # handle shutdown case
417
+ running? ? raise : return
411
418
  end
412
419
 
413
420
  if running?
@@ -1,3 +1,3 @@
1
1
  module RedisFailover
2
- VERSION = '0.9.7'
2
+ VERSION = '0.9.7.1'
3
3
  end
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: 0.9.7
4
+ version: 0.9.7.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-09-24 00:00:00.000000000 Z
12
+ date: 2012-10-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redis
@@ -189,7 +189,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
189
189
  version: '0'
190
190
  segments:
191
191
  - 0
192
- hash: 2274017525429057162
192
+ hash: 4040102937277338807
193
193
  required_rubygems_version: !ruby/object:Gem::Requirement
194
194
  none: false
195
195
  requirements:
@@ -198,7 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
198
  version: '0'
199
199
  segments:
200
200
  - 0
201
- hash: 2274017525429057162
201
+ hash: 4040102937277338807
202
202
  requirements: []
203
203
  rubyforge_project:
204
204
  rubygems_version: 1.8.23