zk 1.9.1 → 1.9.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -72,7 +72,7 @@ See the [RELEASES][] page for more info on features and bugfixes in each release
72
72
 
73
73
  ZK strives to be a complete, correct, and convenient way of interacting with ZooKeeper. There are a few things to be aware of:
74
74
 
75
- * In versions &lte; 0.9 there is only *one* event dispatch thread. It is *very important* that you don't block the event delivery thread. In 1.0, there is one delivery thread by default, but you can adjust the level of concurrency, allowing more control and convenience for building your event-driven app.
75
+ * In versions < 0.9 there is only *one* event dispatch thread. It is *very important* that you don't block the event delivery thread. In 1.0, there is one delivery thread by default, but you can adjust the level of concurrency, allowing more control and convenience for building your event-driven app.
76
76
 
77
77
  * ZK uses threads. You will have to use synchronization primitives if you want to avoid getting hurt. There are use cases that do not require you to think about this, but as soon as you want to register for events, you're using multiple threads.
78
78
 
@@ -1,8 +1,13 @@
1
1
  This file notes feature differences and bugfixes contained between releases.
2
2
 
3
+ ### v1.9.2 ###
4
+
5
+ * Fix re-watching znodes after a lost session #72 (reported by kalantar)
6
+
7
+
3
8
  ### v1.9.1 ###
4
9
 
5
- * Fix re-rewatchind children watchers after the parent znode was deleted #68
10
+ * Fix re-rewatching children watchers after the parent znode was deleted #68
6
11
  * Deal with reopening a closed connection properly #70
7
12
 
8
13
 
@@ -206,6 +206,9 @@ module ZK
206
206
 
207
207
  # (see Base#reopen)
208
208
  def reopen(timeout=nil)
209
+ # Clear outstanding watch restrictions
210
+ @event_handler.clear_outstanding_watch_restrictions!
211
+
209
212
  # If we've forked, then we can call all sorts of normally dangerous
210
213
  # stuff because we're the only thread.
211
214
  if forked?
@@ -206,6 +206,13 @@ module ZK
206
206
  end
207
207
  end
208
208
 
209
+ # used when establishing a new session
210
+ def clear_outstanding_watch_restrictions!
211
+ synchronize do
212
+ @outstanding_watches.values.each { |set| set.clear }
213
+ end
214
+ end
215
+
209
216
  # shut down the EventHandlerSubscriptions
210
217
  def close
211
218
  synchronize do
@@ -1,3 +1,3 @@
1
1
  module ZK
2
- VERSION = "1.9.1"
2
+ VERSION = "1.9.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.1
4
+ version: 1.9.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-09-09 00:00:00.000000000 Z
13
+ date: 2013-09-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: zookeeper
@@ -167,7 +167,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
167
167
  version: '0'
168
168
  segments:
169
169
  - 0
170
- hash: 1065717701995457844
170
+ hash: 2898097721842831525
171
171
  required_rubygems_version: !ruby/object:Gem::Requirement
172
172
  none: false
173
173
  requirements:
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
176
  version: '0'
177
177
  segments:
178
178
  - 0
179
- hash: 1065717701995457844
179
+ hash: 2898097721842831525
180
180
  requirements: []
181
181
  rubyforge_project:
182
182
  rubygems_version: 1.8.25