cql-rb 1.1.0.pre7 → 1.1.0.pre8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- N2VjM2JjM2ZiNjU3MTkzOTk4MTU2MjUyMWViZWIwYTExMjc4MTQ0MA==
4
+ NzkxNmUwM2YwMzllNGEyNGU4NmY0Mjg1N2RmYzBmZjQ0NmU1ODE3NQ==
5
5
  data.tar.gz: !binary |-
6
- OWQ2NWYxY2UwN2YxNjM0NmYxZmRlMmViMmI3OGJlMDdmZTE2NDY3Zg==
6
+ ZDJhMzk2Nzg1MGNiODYxNjYwYTcyY2YyMjcwZmRhYjU4OGMyY2MxYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OTZkNmMzNjk5MDRhODdjZmNkMzljZDMxMzA2ZWQ1MWFjM2EyNWI3NmZmMjI2
10
- OWZlMzY3NTczOTZiYzY2YmQ2ZWFmZWQ0ZTM1M2NjODBkOTI0MzMwODc2YmEx
11
- OTBhNzdiZWNjYWY0YzA4NTQyNzc2NThhNTY2ZWM1ZDFmYmRjMDg=
9
+ MTBmMzM1NzYyYTk3ODc0YjgyMzE1ODA0ZWE4ODVkMzc3ZjQ0ODE0YTY3MjA0
10
+ MzRiODU5OGFlMjEzYmZkYTQ2MzI3MmFiMDQxYWNiOTI0NjMzYjQ1YjdlNjE4
11
+ NDlmNjJjZTI0NjJiMGIyMjhhNzNjYzc0N2JkZmEyNzhkZDViM2E=
12
12
  data.tar.gz: !binary |-
13
- NGM4NmMyZDRhOTE3MTg4NmNjOGFmYmZhNmU5MWRiMTkzOWM4NzhlYzE2YTRk
14
- ZGFmODJmMGNiMGRlNjFmZTNhMTZhYjdmYzhmOTMwNmQwOWFjMDc5NTk5Y2Jj
15
- OTRiYWVkMWY2ZTYxMzUxMmRiODY4ZGQ5MzE3NWRkYzk5MTVlMGU=
13
+ NWFmNzk3MTc2NzlmOWJhZDlkMDAwYmNjNGNmNDUwN2Q0M2Y2NmEzNTZjY2Fi
14
+ NjIxMzQ2MjYxMTZiN2NhMzc1Y2M4ODg3MDdjYjQ3MmVjZGEwMDZlOGEwMjY5
15
+ YTc1YWZjOGU0MzVjOTcwZDIzMTc4OTE4ZDc1N2ZkODk4YjU4MmI=
data/README.md CHANGED
@@ -151,13 +151,13 @@ Read more about CQL3 in the [CQL3 syntax documentation](https://github.com/apach
151
151
 
152
152
  ## I get "Deadlock detected" errors
153
153
 
154
- This means that the driver's IO reactor has crashed hard. Most of the time it means that you're using a framework, server or runtime that forks and you call `Client.connect` in the parent process. Check the documentation and see if there's any way you can register to run some piece of code in the child process just after a fork.
154
+ This means that the driver's IO reactor has crashed hard. Most of the time it means that you're using a framework, server or runtime that forks and you call `Client.connect` in the parent process. Check the documentation and see if there's any way you can register to run some piece of code in the child process just after a fork, and connect there.
155
155
 
156
156
  This is how you do it in Resque:
157
157
 
158
158
  ```ruby
159
159
  Resque.after_fork = proc do
160
- # ...
160
+ # connect to Cassandra here
161
161
  end
162
162
  ```
163
163
 
@@ -166,7 +166,7 @@ and this is how you do it in Passenger:
166
166
  ```ruby
167
167
  PhusionPassenger.on_event(:starting_worker_process) do |forked|
168
168
  if forked
169
- # ...
169
+ # connect to Cassandra here
170
170
  end
171
171
  end
172
172
  ```
@@ -175,7 +175,7 @@ in Unicorn you do it in the config file:
175
175
 
176
176
  ```ruby
177
177
  after_fork do |server, worker|
178
- # ...
178
+ # connect to Cassandra here
179
179
  end
180
180
  ```
181
181
 
@@ -199,7 +199,7 @@ Port 9160 is the old Thrift interface, the binary protocol runs on 9042. This is
199
199
 
200
200
  ## One of my Cassandra nodes crashed, and my application crashed, isn't Cassandra supposed to be fault tolerant?
201
201
 
202
- Yes it is, and your data is probably safe. cql-rb is just not completely there yet. Ideally it should handle connectivity issues and just talk to the nodes it can talk to and reconnect when things get back to normal. It's on the roadmap.
202
+ Yes it is, and your data is probably safe. cql-rb is just not completely there yet. Ideally it should handle connectivity issues and just talk to the nodes it can talk to and reconnect when things get back to normal. _This is fixed in HEAD and will be released with v1.1.0_.
203
203
 
204
204
  ## Something else is not working
205
205
 
@@ -212,8 +212,8 @@ Check out the [releases on GitHub](https://github.com/iconara/cql-rb/releases).
212
212
  # Known bugs & limitations
213
213
 
214
214
  * No automatic peer discovery -- _this is in HEAD and will be released with v1.1.0_.
215
- * No automatic reconnection on connection failures -- _this is planned for v1.1.0_.
216
- * No support for request timeouts (other than server-initiated), but requests to a node fail when that node goes down.
215
+ * No automatic reconnection on connection failures -- _this is in HEAD and will be released with v1.1.0_.
216
+ * No support for request timeouts (other than server-initiated), but requests to a node fail when that node goes down -- _this is in HEAD and will be released with v1.1.0_.
217
217
  * No support for compression.
218
218
  * No support for request tracing.
219
219
  * JRuby 1.6.8 and earlier is not supported, the tests pass in 1.6.8, but 1.6.4 is known not to work. Travis does not support JRuby 1.6.x so there's no way to get good coverage of what works and not. The only known issue in 1.6.8 is that connection failures aren't handled correctly.
@@ -327,18 +327,21 @@ module Cql
327
327
  #
328
328
  # @return [Object] the value of this future
329
329
  def value
330
+ semaphore = nil
330
331
  @lock.synchronize do
331
332
  raise @error if @failed
332
333
  return @value if @resolved
333
- t = Thread.current
334
- u = proc { t.run }
334
+ semaphore = Queue.new
335
+ u = proc { semaphore << :unblock }
335
336
  @value_listeners << u
336
337
  @failure_listeners << u
337
- while true
338
+ end
339
+ while true
340
+ @lock.synchronize do
338
341
  raise @error if @failed
339
342
  return @value if @resolved
340
- @lock.sleep
341
343
  end
344
+ semaphore.pop
342
345
  end
343
346
  end
344
347
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Cql
4
- VERSION = '1.1.0.pre7'.freeze
4
+ VERSION = '1.1.0.pre8'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cql-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.pre7
4
+ version: 1.1.0.pre8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Theo Hultberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-07 00:00:00.000000000 Z
11
+ date: 2013-10-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A pure Ruby CQL3 driver for Cassandra
14
14
  email: