zk 1.6.2 → 1.6.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -8,8 +8,8 @@ source :rubygems
8
8
  # keep closer track of this stuff to make bisecting easier and travis more
9
9
  # accurate
10
10
 
11
- # git 'git://github.com/slyphon/zookeeper.git', :tag => 'dev/zk/00006' do
12
- # gem 'zookeeper', '~> 1.1.0'
11
+ # git 'git://github.com/slyphon/zookeeper.git', :tag => 'dev/zk/00008' do
12
+ # gem 'zookeeper', '~> 1.2.0'
13
13
  # end
14
14
 
15
15
  gem 'rake', :group => [:development, :test]
data/RELEASES.markdown CHANGED
@@ -1,5 +1,9 @@
1
1
  This file notes feature differences and bugfixes contained between releases.
2
2
 
3
+ ### v1.6.3 ###
4
+
5
+ * Retry when lock creation fails due to a NoNode exception
6
+
3
7
  ### v1.6.2 ###
4
8
 
5
9
  * Change state call to reduce the chances of deadlocks
@@ -156,7 +156,7 @@ module ZK
156
156
  tp_size = opts.fetch(:threadpool_size, DEFAULT_THREADPOOL_SIZE)
157
157
  @threadpool = Threadpool.new(tp_size)
158
158
 
159
- @connection_timeout = opts.fetch(:timeout, DEFAULT_TIMEOUT) # maybe move this into superclass?
159
+ @connection_timeout = opts[:timeout] || DEFAULT_TIMEOUT # maybe move this into superclass?
160
160
  @event_handler = EventHandler.new(self, opts)
161
161
 
162
162
  @reconnect = opts.fetch(:reconnect, true)
@@ -244,6 +244,9 @@ module ZK
244
244
 
245
245
  logger.debug { "reopening, no fork detected" }
246
246
  @last_cnx_state = Zookeeper::ZOO_CONNECTING_STATE
247
+
248
+ timeout ||= @connection_timeout # or @connection_timeout here is the docuemnted behavior on Base#reopen
249
+
247
250
  @cnx.reopen(timeout) # ok, we werent' forked, so just reopen
248
251
 
249
252
  # this is a bit of a hack, because we need to wait until the event thread
@@ -265,6 +265,8 @@ module ZK
265
265
  #
266
266
  def create_root_path!
267
267
  zk.mkdir_p(@root_lock_path)
268
+ rescue NoNode
269
+ retry
268
270
  end
269
271
 
270
272
  # performs the checks that (according to the recipe) mean that we hold
data/lib/zk/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ZK
2
- VERSION = "1.6.2"
2
+ VERSION = "1.6.3"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zk
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 6
9
- - 2
10
- version: 1.6.2
9
+ - 3
10
+ version: 1.6.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jonathan D. Simms
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-06-01 00:00:00 Z
19
+ date: 2012-06-06 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: zookeeper