zookeeper 1.2.11 → 1.2.12
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/Gemfile +1 -2
- data/lib/zookeeper/common.rb +24 -8
- data/lib/zookeeper/exceptions.rb +2 -2
- data/lib/zookeeper/version.rb +1 -1
- metadata +4 -5
data/CHANGELOG
CHANGED
data/Gemfile
CHANGED
data/lib/zookeeper/common.rb
CHANGED
@@ -118,14 +118,30 @@ private
|
|
118
118
|
hash[:stat] = Zookeeper::Stat.new(hash[:stat]) if hash.has_key?(:stat)
|
119
119
|
hash[:acl] = hash[:acl].map { |acl| Zookeeper::ACLs::ACL.new(acl) } if hash[:acl]
|
120
120
|
|
121
|
-
callback_context =
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
#
|
128
|
-
|
121
|
+
callback_context = nil
|
122
|
+
|
123
|
+
@mutex.synchronize do
|
124
|
+
callback_context = is_completion ? get_completion(hash[:req_id]) : get_watcher(hash[:req_id])
|
125
|
+
|
126
|
+
# When connectivity to the server has been lost (as indicated by SESSION_EVENT)
|
127
|
+
# we want to rerun the callback at a later time when we eventually do have
|
128
|
+
# a valid response.
|
129
|
+
#
|
130
|
+
# XXX: this code needs to be refactored, get_completion shouldn't remove the context
|
131
|
+
# in the case of a session event. this would involve changing the
|
132
|
+
# platform implementations as well, as the C version does some funky
|
133
|
+
# stuff to maintain compatibilty w/ java in chrooted envs.
|
134
|
+
#
|
135
|
+
# The point is that this lock ^^ is unnecessary if the functions above lock internally
|
136
|
+
# and don't do the wrong thing, requiring us to do the below.
|
137
|
+
#
|
138
|
+
if hash[:type] == Zookeeper::Constants::ZOO_SESSION_EVENT
|
139
|
+
if is_completion
|
140
|
+
setup_completion(hash[:req_id], callback_context)
|
141
|
+
else
|
142
|
+
setup_watcher(hash[:req_id], callback_context)
|
143
|
+
end
|
144
|
+
end
|
129
145
|
end
|
130
146
|
|
131
147
|
if callback_context
|
data/lib/zookeeper/exceptions.rb
CHANGED
@@ -9,9 +9,9 @@ module Exceptions
|
|
9
9
|
CONST_MISSING_WARNING = <<-EOS
|
10
10
|
|
11
11
|
------------------------------------------------------------------------------------------
|
12
|
-
WARNING! THE ZOOKEEPER NAMESPACE HAS
|
12
|
+
WARNING! THE ZOOKEEPER NAMESPACE HAS CHANGED AS OF 1.0!
|
13
13
|
|
14
|
-
Please update your code to use the new
|
14
|
+
Please update your code to use the new hierarchy!
|
15
15
|
|
16
16
|
The constant that got you this was ZookeeperExceptions::ZookeeperException::%s
|
17
17
|
|
data/lib/zookeeper/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zookeeper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 1.2.
|
9
|
+
- 12
|
10
|
+
version: 1.2.12
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Phillip Pearson
|
@@ -20,7 +20,7 @@ autorequire:
|
|
20
20
|
bindir: bin
|
21
21
|
cert_chain: []
|
22
22
|
|
23
|
-
date: 2012-07-
|
23
|
+
date: 2012-07-26 00:00:00 Z
|
24
24
|
dependencies:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: logging
|
@@ -177,4 +177,3 @@ test_files:
|
|
177
177
|
- spec/support/progress_formatter.rb
|
178
178
|
- spec/support/zookeeper_spec_helpers.rb
|
179
179
|
- spec/zookeeper_spec.rb
|
180
|
-
has_rdoc:
|