-
Notifications
You must be signed in to change notification settings - Fork 75
/
CHANGELOG
418 lines (276 loc) · 16.1 KB
/
CHANGELOG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
v1.5.5
* Fix loading in Ruby 3.2 (h/t: @emceeaich & @tsroten)
v1.5.4
* Ruby 3.2 compatibility (h/t: @cheister & @EricRoos)
v1.5.3
* Ruby 3.1 compatibility (h/t: @casperisfine)
v1.5.2 (YANKED)
* Ruby 3.1 compatibility and zookeeper client updates.
* This release had build issues in the wild and was yanked
v1.5.1
* Update config.guess to support newer environments (h/t: @malmckay)
v1.5.0
* (housekeeping) Moves build to Github Actions from TravisCI
* (housekeeping) Drops build support for MRI Ruby < 2.5 and other rubies
* Build on Ruby 3 (#99) (h/t: @malmckay)
* Build on MacOS (#98) (h/t: @malmckay)
* Work around compiler errors on newer versions of gcc (#97) (h/t: @nickmarden)
* Fix a typo on a has_key (#83) (h/t: @lexspoon)
* Adds support macOS dylib (#86) (h/t: @pftg)
* Fix compilation on ARM (#82) (h/t: @cdonati)
v1.4.11
* backported fix for ZOOKEEPER-2253 by @chchen - #76
v1.4.10
* fix for ruby 2.2.0 build - #74 (h/t: fbernier)
v1.4.9
* Fix for build on OS-X 10.10 by @e0en
v1.4.8
* Fix deadlock related to state checks that can happen during reconnecting
v1.4.7
* Fixing dependent library compilation on FreeBSD 10 #53 (h/t: gogreen53)
v1.4.6
* Fix two issues with dealing with unresponsive zookeeper servers
that would prevent the client from properly recovering the session
(including one in the Apache ZooKeeper C library — see ZOOKEEPER-1756
for more details)
* Reduce the chances of seeing Zookeeper::Exceptions::NotConnected
exceptions by only submitting new commands if we are connected
* Prevent commands from being queued to be sent to the server if the
session has expired which will solve most cases involving the
Zookeeper::Exceptions::ContinuationTimeoutError exception
* Upgrade the Apache ZooKeeper C library to 3.4.5 (client is backward
compatible with 3.3 servers). The Java library has not been updated.
* Cleanup complaints from compiler for uninitialized variable access
v1.4.5
* Allow passing :session_id and :session_password options #42 (thanks to avalanche123)
* Fix permissions constants #46, #47, #48 (thanks to jaeho-kim)
* Allow JRuby to read nil values #44 (thanks to reidmorrison)
v1.4.4 fix build under FreeBSD (h/t: stass)
* https://github.com/slyphon/zookeeper/pull/40
v1.4.3 fix build for ruby 2.0.0-rc2
* https://github.com/slyphon/zookeeper/pull/34
v1.4.2 fix a bug in the forwarding logger format string
v1.4.1 merge pull request 29 - fix exception handling in jruby 1.7.x
* h/t to @dynamix for the patch
v1.4.0 Removed the 'logging' gem
* At the request of a user, use of the logging gem has been discontinued as
it appears to cause a fair amount of RSS memory bloating (8MB was
reported). It's been replaced by a fairly simple ad-hoc implementation
using the stdlib 'logger' class. No user impact is expected unless you were
adjusting the Loggers on components of zookeeper.
v1.3.0 much needed refactor of event and async result delivery
* event and async blocks were previously mixed in with a bunch of other
common code, and shared a Monitor with other unrelated functionality. This
code has been gently refactored into its own self-contained class (with its
own task-specific lock), which should help with maintenance.
v1.2.14 merge add_auth pull request, reduce chances for ContinuationTimeoutError
* added support for the add_auth call (h/t: @bradhe) see pull req #25
* fix a corner case where some pending Continuations may get stuck without
being shutdown when the event thread exits. This would lead to a
ContinuationTimeoutError being raised after 30s as a failsafe.
v1.2.13 fix build under rbenv
* h/t to Eric Lindvall for fixing #22 in http://git.io/PEPgnA
build reportedly works in rbenv now.
v1.2.12 improve locking in dispatch_next_callback
* Possible fix for an edgy NoMethodError on nil
v1.2.11 remove dependency on backports gem
* Somewhat naively we were requiring the backports gem to provide
Kernel#require_relative. This release implements similar functionlity
inside the Zookeeper module and doesn't affect the global namespace.
We apologise for the inconvenience.
v1.2.10 minor bug fix in java code
* Don't obscure a legitimate exception because of an unexpected nil
v1.2.7 further lock adjustments, deadlock risk reduction
* Refactor ZookeeperBase to not hold onto the mutex while waiting
for the dispatch thread to exit and the CZookeeper instance to close.
Instead, lock, nil out @czk, and unlock (which will cause all calls to
raise NotConnected), and then carry on with the shutdown procedure, greatly
reducing the chances of a deadlock. Also add a hardcoded 30 second timeout
to the join of the shutdown thread, that way we won't hang indefinitely in
the case of an unforseen condition.
* Improve the CZookeeper#wait_until_connected to use a deadline approach
to waiting for both running and connected states. Also, handle the
'nil' (wait forever) timeout properly.
* Wake all waiting threads on all ConditionVariables when CZookeeper#shut_down!
is called
v1.2.6 fix build on fedora
v1.2.5 cleanup locking in ZookeeperBase
* There were several situations where we would hold the lock before calling
a method on CZookeeper (inquisitors and #create in particular). This
exposed us to deadlocks in situations where an async event would be
delivered (probably a SESSION_EXPIRED event), but the callback block could
not be called because the dispatch thread would block on the mutex being
held by the caller of create.
This version cleans up that usage, and ensures that the only time we hold
the mutex is during startup/shutdown (when the value of @czk may be changing),
and in all other cases we grab the mutex, dereference, and unlock then perform
whatever action on the reference.
* Add a safety net to Continuation (which will soon be called 'Promise' or
'Future' at the request of @eric). If any operation takes more than 30s
an exception will be raised in the calling thread. The session timeout
setting makes it so that no operation should take more than 20s, so we know
if we haven't received a reply in *longer* than that, something has gone
awry.
v1.2.4 fix buffer overflow in CZookeeper client_id code
* the 'passwd' part of the struct is a char[16], but isn't null terminated.
use rb_str_new with an explicit length, rather than rb_str_new2 which
uses strlen().
v1.2.3 ensure that all threads are woken up on shutdown
* There was an edge case where a call would be queued up and its thread
sleeping waiting for a response, but that response would never come because
the connection was shut down. This version includes a patch for that case
to ensure that if a call is in 'pending' state, and shutdown time arrives
that all pending threads will receive a Zookeeper::Exceptions::NotConnected
exception.
v1.2.2 avoid race while waiting for connection
* There was a possible race in CZookeeper#wait_until_connected where if we
couldn't connect to the port specified (localhost:28271) then we wound up
burning 100% CPU and spinning. This solution fixes that by hooking into the
event delivery and keeping track of what the current state is. When there's
a change, we use a ConditionVariable to wake up threads that were waiting
until the connection was connected. Additionally, we now respect the
timeout parameter again.
v1.2.1 simplify assert_open
* The client methods were all calling assert_open before performing an
action. This was meant as a fail-early lightweight check of the connection
state and it worked well when we were running against the mt code. Now this
requires us to use a Continuation and make our way through the event loop.
There is a possible deadlock this release should solve that was caused by
the assert_open code holding a lock while making an async call through
the event loop. This is no longer the case. The assert_open call only checks
that the current handle hasn't been closed, the connection-state checking
now occurs before submitting a request on the event iteration thread, and
the behavior should be the same as it was before. If the underlying
connection is not in the 'connected' state, an exception will be raised.
v1.2.0 Stop the World, I Wanna fork()
* changed pause/resume methods to pause_before_fork_in_parent
and resume_after_fork_in_parent to match their ZK counterparts
* replaced the Queue in QueueWithPipe (really have to change that name)
with an Array and Mutex/ConditionVariable pair. This allows us to
have better control over the shutdown signaling, and lets us resume
operations after a pause.
v1.1.1 Cleanup after code review (h/t @eric)
* While hunting down this bug: https://bugs.ruby-lang.org/issues/6438
Eric Lindvall made a number of helpful catches.
* Reduce syscall overhead by not using an unnecessary pipe in the event_lib.c
implementation
* More careful use of rb_raise, don't longjmp past necessary free() calls.
* More careful malloc in the get() implementation (we need to allocate 1MB
to hold the data in a znode, but only in the SYNC cases).
v1.1.0 Rewrite C backend to use zookeeper_st, the async library
* In order to ensure fork safety, a rewrite of the backend was necessary.
It was impossible to guarantee with the mt lib that a lock would not
be held by a thread when fork() was called, which opened up the possibility
for corruption and other badness.
This version contains a Continuation class, which allows us to present a
synchronous front-end to the asynchronous backend. All features are still
supported, no special action is necessary to prepare for a fork, and the
post-fork procedure is the same as before: call reopen() in the child,
continue on in the parent like nothing happened.
v1.0.6 Only include backports if RUBY_VERSION is 1.8.x
* 'backports' pollutes too much, use sparingly
v1.0.5 Minor cleanup
* Fix the InheritedConnectionError message
* Clean up the module includes
v1.0.3 Linux: Fix hang on reopen after fork
* Linux users relying on fork() should upgrade to 1.0.3, as it
fixes a bug in the reopen code that would cause a hang in the child.
If you're running on linux, you *really* should upgrade
v1.0.0 Single Zookeeper namespace
* The top level Zookeeper class is now a module, the former Zookeeper
class is now Zookeeper::Client
* Consolidate the 6 top-level namespaces into one, Zookeeper module
ZookeeperCommon -> Zookeeper::Common
ZookeeperCallbacks -> Zookeeper::Callbacks
ZookeeperConstants -> Zookeeper::Constants
ZookeeperExceptions -> Zookeeper::Exceptions
ZookeeperACLs -> Zookeeper::ACLs
CZookeeper -> Zookeeper::CZookeeper
* Added a 'zookeeper/compatibility' file that will define the old names
and look up the new constants for users, and print a warning telling them
the change has occurred and that they should update their code
* Added scripts/upgrade-1.0-sed-alike.rb which will basically do a
find-and-replace, changing the old names to the new names (worked on
both the Zookeeper and ZK codebases).
* Java and C now use different names for the base class, to avoid the
possibility of error. Java is now JavaBase, C remains ZookeeperBase.
* All client methods are defined in the ClientMethods module and mixed
into the constructed Client class.
* Fix all requires, no longer monkey with $LOAD_PATH, use require_relative
* Bugfix for C client.
Because we release the GIL, there's the possibilty that in the middle of a
synchronous C call, ruby will have switched thread contexts and one of
those threads will call close. It seems that during normal operation, this
is not a problem, but during shutdown, this causes CPU to spike to 100% and
a deadlock. This fix essentially wraps every call to the C layer in a
mutex. There may be a slightly less heavyweight optimization in the future,
but this is the safest option at the moment.
v0.9.3 Event thread shutdown fix, Windows compatibility fix
* Use a 'shutdown thread' to coordinate cleanup if close is called from the
event thread (prevents deadlock)
* Default Logger now uses $stderr instead of opening /dev/null [#16]
* Gemfile/gemspec/Rakefile refactoring.
v0.9.2 More efficient and simpler wrappers for GIL release
* After a code review by Andrew Wason (rectalogic), use a much simpler
technique for creating the arg structs and passing them to the
zkrb_gvl_* functions. No malloc(), no free(), no problem.
v0.9.1 see v0.8.4 notes, same patch
v0.9.0 RELEASE THE KRAK..er, GIL!!
* In >= 1.9.2 the ruby interpreter allows you to release the GIL when
calling into native code, sounds like a good idea.
This release makes use of that code by parsing the zookeeper.h header file
and extracting the method signatures of all relevant zoo_* functions, then
generating boilerplate that allows us to call those functions via the
rb_thread_blocking_region function.
1.8.7 compatibility is maintained by stubbing out that functionality if built
under 1.8.7.
* 1.8.7 is deprecated! I will continue to support 1.8.7 for the near future
but sometime soon, you're gonna have to upgrade.
v0.8.4 fix NameError, require 'forwardable'
* Really not sure why this didn't come up in tests
* issue here https://github.com/slyphon/zk/issues/22
v0.8.3 fix NonLocalJump exception in event delivery thread shutdown code
* hit a corner case where we're waiting for the zkc handle setup
and the user decides to shutdown, but before we've had a chance
to enter the delivery loop.
* Cleaned up some nasty code in ZookeeperConstants
* removed ZookeeperConstants#print_events and ZookeeperConstants#print_states
* changed EVENT_TYPE_NAMES and EVENT_STATE_NAMES in ZookeeperConstants
to use string values instead of symbols
v0.8.2 fix close after a fork()
* The dispatch thread will be dead in this situation, so we need to
check to see if it's already dead before waiting on it to exit.
v0.8.1 Java client fix, silence warnings
v0.8.0 Refactor C implementaion, EventMachine client
* separated CZookeeper and ZookeeperBase implementation
This solves issues with reopen not working properly, makes for a much
cleaner event delivery implementation. ZookeeperBase controls the lifecycle
of the event dispatch thread now, rather than it being tied to CZookeeper.
* added support for the 'sync' API call
* Refactored zookeeper_c.c and zookeeper_lib.c
More error checking in zookeeper_lib.c and restructure some things to make
logic easier to follow
Fix bug in method_get_next_event that made the shutdown case so complicated
* Massively simplified EMClient implementation
Rather than trying to hook the IO used by zookeeper_lib to notify zookeeper_c
about event availabiltiy directly into EventMachine, use the same event delivery
thread, but wrap the dispatch call in EM.schedule.
* Improve implementation of spin-lock-esque code that waits for the connection to be
established before returning.
This cut the test runtime down from 1m 20s to 2s.
* Java client refactoring, similar correctness changes
* Change ZookeeperException base class to StandardError instead of Exception
v0.4.5 Upgrade to ZooKeeper 3.3.3
v0.4.4 Fix race condition on close, possible data corruption on async get.
v0.4.3 Fix a handful of memory-related bugs, fix SIGSEGV on master change, reduce latency of event handling, fix compilation on OSX.
v0.4.2 Add options to Zookeeper#initialize, silence most Zookeeper logs.
v0.4.1 Upgrade to ZooKeeper 3.3.2
v0.4.0. More attr-readers (StarvingMarvin) and 1.9 compatibility (tsuraan)
v0.3.2. Handle close, closed connections and expired sessions a little more gracefully.
v0.3.1. ACL bugfix.
v0.3.0. Wickman's rewrite, breaks dependencies from myelin/emaland port.
v0.2.2. Fix compatibility with stock Leopard fat-binary Ruby.
v0.2.1. No more camelcase classname.
v0.2. Bundle C dependencies, like memcached.gem.
v0.1. First release.
# vim:ft=text:ts=2:sw=2:et