Skip to content
Newer
Older
100644 279 lines (157 sloc) 15.3 KB
d0c18a7 @slyphon adding a RELEASES file to track user-facing feature changes.
slyphon authored Apr 23, 2012
1 This file notes feature differences and bugfixes contained between releases.
6a02d84 @slyphon doc tweaks
slyphon authored May 9, 2012
2
a593340 @slyphon bump version to 1.7.3
slyphon authored Oct 10, 2012
3 ### v1.7.3 ###
4
5 * bug fix for "Callbacks Hash in EventHandlerSubscription::Base gets longer randomly" (#52)
6
7 I'd like to point out that the callbacks hash gets longer *deterministically*, depending on what callbacks get registered. This patch will do further cleanup so as not to leave empty arrays littering the EventHandler.
8
9 ### v1.7.2 ###
10
11 * bug fix for "Ephemeral node for exclusive lock not cleaned up when failure happens during lock acquisition" (#51)
12
518bd87 @slyphon closes #49, prep for release of 1.7.1
slyphon authored Sep 22, 2012
13 ### v1.7.1 ###
14
15 * Fixes nasty bug "LockWaitTimeout causes lock to be forever unusable" (#49)
16
17 The code path in the case of a LockWaitTimeout would skip the lock node cleanup, so a given lock name would become unusable until the timed-out-locker's session went away. This fixes that case and adds specs.
18
dd1a5af @slyphon add RELEASES and README notes about 1.7.0 :wait feature
slyphon authored Aug 29, 2012
19 ### v1.7.0 ###
20
21 * Added Locker timeout feature for blocking calls. (issue #40)
22
23 Previously, when dealing with locks, there were only two options: blocking or non-blocking. In order to come up with a time-limited lock, you had to poll every so often until you acquired the lock. This is, needless to say, both inefficient and doesn't allow for fair acquisition.
24
25 A timeout option has been added so that when blocking waiting for a lock, you can specify a deadline by which the lock should have been acquired.
26
27 ```ruby
28 zk = ZK.new
29
30 locker = zk.locker('lock name')
31
32 begin
33 locker.lock(:wait => 5.0) # wait up to 5.0 seconds to acquire the lock
34 rescue ZK::Exceptions::LockWaitTimeoutError
35 $stderr.puts "could not acquire the lock in time"
36 end
37 ```
38
39 Also available when using the convenience `#with_lock` methods
40
41 ```ruby
42
43 zk = ZK.new
44
45 begin
46 zk.with_lock('lock name', :wait => 5.0) do |lock|
47 # do stuff while holding lock
48 end
49 rescue ZK::Exceptions::LockWaitTimeoutError
50 $stderr.puts "could not acquire the lock in time"
51 end
52
53 ```
54
55
c8ad122 @slyphon bump version, add release notes
slyphon authored Jul 19, 2012
56 ### v1.6.4 ###
57
58 * Remove unnecessary dependency on backports gem
59 * Fix for use in resque! A small bug was preventing resque from activating the fork hook.
60
17508dc @slyphon add 1.6.3 note
slyphon authored Jun 6, 2012
61 ### v1.6.3 ###
62
63 * Retry when lock creation fails due to a NoNode exception
64
95ce4f8 @slyphon 1.6.2 RELEASES message, tweak README
slyphon authored Jun 1, 2012
65 ### v1.6.2 ###
66
67 * Change state call to reduce the chances of deadlocks
68
69 One of the problems I've been seeing is that during some kind of shutdown event, some method will call `closed?` or `connected?` which will acquire a mutex and make a call on the underlying connection at the *exact* moment necessary to cause a deadlock. In order to help prevent this, and building on some changes from 1.5.3, we now treat our cached `@last_cnx_state` as the current state of the connection and don't touch the underlying connection object (except in the case of the java driver, which is safe).
70
3cf3c65 @slyphon releases note for 1.6.1
slyphon authored May 31, 2012
71 ### v1.6.1 ###
72
73 * Small fixes for zk-eventmachine compatibilty
74
84a1ac0 @slyphon Add ZK::Locker.cleanup (closes #33)
slyphon authored May 25, 2012
75 ### v1.6.0 ###
76
77 * Locker cleanup code!
78
79 When a session is lost, it's likely that the locker's node name was left behind. so for `zk.locker('foo')` if the session is interrupted, it's very likely that the `/_zklocking/foo` znode has been left behind. A method has been added to allow you to safely clean up these stale znodes:
80
81 ```ruby
82 ZK.open('localhost:2181') do |zk|
83 ZK::Locker.cleanup(zk)
84 end
85 ```
86
87 Will go through your locker nodes one by one and try to lock and unlock them. If it succeeds, the lock is naturally cleaned up (as part of the normal teardown code), if it doesn't acquire the lock, then no harm, it knows that lock is still in use.
88
89d83ab @slyphon add a note about create :or => :set
slyphon authored May 29, 2012
89 * Added `create('/path', 'data', :or => :set)` which will create a node (and all parent paths) with the given data or set its contents if it already exists. It's intended as a convenience when you just want a node to exist with a particular value.
90
84a1ac0 @slyphon Add ZK::Locker.cleanup (closes #33)
slyphon authored May 25, 2012
91 ### v1.5.3 ###
92
93 * Fixed reconnect code. There was an occasional race/deadlock condition caused because the reopen call was done on the underlying connection's dispatch thread. Closing the dispatch thread is part of reopen, so this would cause a deadlock in real-world use. Moved the reconnect logic to a separate, single-purpose thread on ZK::Client::Threaded that watches for connection state changes.
94
95 * 'private' is not 'protected'. I've been writing ruby for several years now, and apparently I'd forgotten that 'protected' does not work like how it does in java. The visibility of these methods has been corrected, and all specs pass, so I don't expect issues...but please report if this change causes any bugs in user code.
96
97
814e025 @slyphon update RELEASES file
slyphon authored May 24, 2012
98 ### v1.5.2 ###
99
100 * Fix locker cleanup code to avoid a nasty race when a session is lost, see [issue #34](https://github.com/slyphon/zk/issues/34)
101
102 * Fix potential deadlock in ForkHook code so the mutex is unlocked in the case of an exception
103
104 * Do not hang forever when shutting down and the shutdown thread does not exit (wait 30 seconds).
105
66d69a6 @slyphon add 1.5.1 release info and document :retry_duration
slyphon authored May 23, 2012
106 ### v1.5.1 ###
107
108 * Added a `:retry_duration` option to client constructor which will allows the user to specify for how long in the case of a connection loss, should an operation wait for the connection to be re-established before retrying the operation. This can be set at a global level and overridden on a per-call basis. The default is to not retry (which may change at a later date). Generally speaking, a timeout of > 30s is probably excessive, and care should be taken because during a connection loss, the server-side state may change without you being aware of it (i.e. events will not be delivered).
109
110 * Small fork-hook implementation fix. Previously we were using WeakRefs so that hooks would not prevent an object from being garbage collected. This has been replaced with a finalizer which is more deterministic.
111
5a320f6 @slyphon add README and RELEASES entries for 1.5.0
slyphon authored May 22, 2012
112 ### v1.5.0 ###
113
114 Ok, now seriously this time. I think all of the forking issues are done.
115
12cd798 @slyphon tweak RELEASES file
slyphon authored May 22, 2012
116 * Implemented a 'stop the world' feature to ensure safety when forking. All threads are stopped, but state is preserved. `fork()` can then be called safely, and after fork returns, all threads will be restarted in the parent, and the connection will be torn down and reopened in the child.
5a320f6 @slyphon add README and RELEASES entries for 1.5.0
slyphon authored May 22, 2012
117
12cd798 @slyphon tweak RELEASES file
slyphon authored May 22, 2012
118 * The easiest, and supported, way of doing this is now to call `ZK.install_fork_hook` after requiring zk. This will install an `alias_method_chain` style hook around the `Kernel.fork` method, which handles pausing all clients in the parent, calling fork, then resuming in the parent and reconnecting in the child. If you're using ZK in resque, I *highly* recommend using this approach, as it will give the most consistent results.
5a320f6 @slyphon add README and RELEASES entries for 1.5.0
slyphon authored May 22, 2012
119
120 * Logging is now off by default, and uses the excellent, can't-recommend-it-enough, [logging](https://github.com/TwP/logging) gem. If you want to tap into the ZK logs, you can assign a stdlib compliant logger to `ZK.logger` and that will be used. Otherwise, you can use the Logging framework's controls. All ZK logs are consolidated under the 'ZK' logger instance.
121
aa23e30 @slyphon prepare for 1.4.1 release
slyphon authored May 14, 2012
122 ### v1.4.1 ###
123
124 * True fork safety! The `zookeeper` at 1.1.0 is finally fork-safe. You can now use ZK in whatever forking library you want. Just remember to call `#reopen` on your client instance in the child process before attempting any opersations.
125
126
6c9f56d @slyphon document children, and update RELEASES
slyphon authored May 9, 2012
127 ### v1.4.0 ###
128
e2e0b2b @slyphon readme and releases update for 1.4.0
slyphon authored May 10, 2012
129 * Added a new `:ignore` option for convenience when you don't care if an operation fails. In the case of a failure, the method will return nil instead of raising an exception. This option works for `children`, `create`, `delete`, `get`, `get_acl`, `set`, and `set_acl`. `stat` will ignore the option (because it doesn't care about the state of a node).
6c9f56d @slyphon document children, and update RELEASES
slyphon authored May 9, 2012
130
131 ```
132 # so instead of having to do:
133
134 begin
135 zk.delete('/some/path')
136 rescue ZK::Exceptions;:NoNode
137 end
138
139 # you can do
140
141 zk.delete('/some/path', :ignore => :no_node)
142
143 ```
144
e2e0b2b @slyphon readme and releases update for 1.4.0
slyphon authored May 10, 2012
145 * MASSIVE fork/parent/child test around event delivery and much greater stability expected for linux (with the zookeeper-1.0.3 gem). Again, please see the documentation on the wiki about [proper fork procedure](http://github.com/slyphon/zk/wiki/Forking).
6c9f56d @slyphon document children, and update RELEASES
slyphon authored May 9, 2012
146
46fd5f4 @slyphon update RELEASES doc
slyphon authored May 9, 2012
147 ### v1.3.1 ###
148
149 * [fix a bug][bug 1.3.1] where a forked client would not have its 'outstanding watches' cleared, so some events would never be delivered
150
151 [bug 1.3.1]: https://github.com/slyphon/zk/compare/release/1.3.0...9f68cee958fdaad8d32b6d042bf0a2c9ab5ec9b0
152
153 ### v1.3.0 ###
154
155 Phusion Passenger and Unicorn users are encouraged to upgrade!
156
157 * __fork()__: ZK should now work reliably after a fork() if you call `reopen()` ASAP in the child process (before continuing any ZK work). Additionally, your event-handler (blocks set up with `zk.register`) will still work in the child. You will have to make calls like `zk.stat(path, :watch => true)` to tell ZooKeeper to notify you of events (as the child will have a new session), but everything should work.
158
159 * See the fork-handling documentation [on the wiki](http://github.com/slyphon/zk/wiki/Forking).
160
161
9bb0f3d @slyphon update README and RELEASES for 1.2 release
slyphon authored May 7, 2012
162 ### v1.2.0 ###
163
164 You are __STRONGLY ENCOURAGED__ to go and look at the [CHANGELOG](http://git.io/tPbNBw) from the zookeeper 1.0.0 release
165
166 * NOTICE: This release uses the 1.0 release of the zookeeper gem, which has had a MAJOR REFACTORING of its namespaces. Included in that zookeeper release is a compatibility layer that should ease the transition, but any references to Zookeeper\* heirarchy should be changed.
167
168 * Refactoring related to the zokeeper gem, use all the new names internally now.
169
170 * Create a new Subscription class that will be used as the basis for all subscription-type things.
171
172 * Add new Locker features!
173 * `LockerBase#assert!` - will raise an exception if the lock is not held. This check is not only for local in-memory "are we locked?" state, but will check the connection state and re-run the algorithmic tests that determine if a given Locker implementation actually has the lock.
174 * `LockerBase#acquirable?` - an advisory method that checks if any condition would prevent the receiver from acquiring the lock.
175
176 * Deprecation of the `lock!` and `unlock!` methods. These may change to be exception-raising in a future relase, so document and refactor that `lock` and `unlock` are the way to go.
177
178 * Fixed a race condition in `event_catcher_spec.rb` that would cause 100% cpu usage and hang.
179
b5fb462 @slyphon prep for 1.1.1
slyphon authored May 4, 2012
180 ### v1.1.1 ###
181
182 * Documentation for Locker and ilk
183
184 * Documentation cleanup
185
186 * Fixes for Locker tests so that we can run specs against all supported ruby implementations on travis (relies on in-process zookeeper server in the zk-server-1.0.1 gem)
187
188 * Support for 1.8.7 will be continued
189
190 ## v1.1.0 ##
191
192 (forgot to put this here, put it in the readme though)
193
194 * NEW! Thread-per-Callback event delivery model! [Read all about it!](https://github.com/slyphon/zk/wiki/EventDeliveryModel). Provides a simple, sane way to increase the concurrency in your ZK-based app while maintaining the ordering guarantees ZooKeeper makes. Each callback can perform whatever work it needs to without blocking other callbacks from receiving events. Inspired by [Celluloid's](https://github.com/celluloid/celluloid) actor model.
195
196 * Use the [zk-server](https://github.com/slyphon/zk-server) gem to run a standalone ZooKeeper server for tests (`rake SPAWN_ZOOKEEPER=1`). Makes live-fire testing of any project that uses ZK easy to run anywhere!
197
d0c18a7 @slyphon adding a RELEASES file to track user-facing feature changes.
slyphon authored Apr 23, 2012
198
31148ea @slyphon update releases file
slyphon authored Apr 26, 2012
199 ### v1.0.0 ###
200
8a25c3e @slyphon making sure this yak is shaved clean. more RELEASES tweaking
slyphon authored Apr 30, 2012
201 * Threaded client (the default one) will now automatically reconnect (i.e. `reopen()`) if a `SESSION_EXPIRED` or `AUTH_FAILED` event is received. Thanks to @eric for pointing out the _nose-on-your-face obviousness_ and importance of this. If users want to handle these events themselves, and not automatically reopen, you can pass `:reconnect => false` to the constructor.
202
faba133 @slyphon update RELEASES
slyphon authored Apr 26, 2012
203 * allow for both :sequence and :sequential arguments to create, because I always forget which one is the "right one"
31148ea @slyphon update releases file
slyphon authored Apr 26, 2012
204
faba133 @slyphon update RELEASES
slyphon authored Apr 26, 2012
205 * add zk.register(:all) to recevie node updates for all nodes (i.e. not filtered on path)
206
d1107ab @slyphon make a note of the feature in the RELEASES file
slyphon authored Apr 29, 2012
207 * add 'interest' feature to zk.register, now you can indicate what kind of events should be delivered to the given block (previously you had to do that filtering inside the block). The default behavior is still the same, if no 'interest' is given, then all event types for the given path will be delivered to that block.
208
209 zk.register('/path', :created) do |event|
210 # event.node_created? will always be true
211 end
212
213 # or multiple kinds of events
214
215 zk.register('/path', [:created, :changed]) do |event|
216 # (event.node_created? or event.node_changed?) will always be true
217 end
218
faba133 @slyphon update RELEASES
slyphon authored Apr 26, 2012
219 * create now allows you to pass a path and options, instead of requiring the blank string
220
221 zk.create('/path', '', :sequential => true)
222
223 # now also
224
225 zk.create('/path', :sequential => true)
31148ea @slyphon update releases file
slyphon authored Apr 26, 2012
226
11030c3 @slyphon update RELEASES file
slyphon authored Apr 27, 2012
227 * fix for shutdown: close! called from threadpool will do the right thing
228
0f287bb @slyphon add chroot feature to RELEASES file
slyphon authored Apr 29, 2012
229 * Chroot users rejoice! By default, ZK.new will create a chrooted path for you.
230
231 ZK.new('localhost:2181/path', :chroot => :create) # the default, create the path before returning connection
232
233 ZK.new('localhost:2181/path', :chroot => :check) # make sure the chroot exists, raise if not
234
91afafe @slyphon change chroot option from the ambiguous :ignore to :do_nothing
slyphon authored Apr 30, 2012
235 ZK.new('localhost:2181/path', :chroot => :do_nothing) # old default behavior
0f287bb @slyphon add chroot feature to RELEASES file
slyphon authored Apr 29, 2012
236
237 # and, just for kicks
238
239 ZK.new('localhost:2181', :chroot => '/path') # equivalent to 'localhost:2181/path', :chroot => :create
240
3bbd3fd @slyphon note event module in RELEASES
slyphon authored Apr 30, 2012
241 * Most of the event functionality used is now in a ZK::Event module. This is still mixed into the underlying slyphon-zookeeper class, but now all of the important and relevant methods are documented, and Event appears as a first-class citizen.
d1107ab @slyphon make a note of the feature in the RELEASES file
slyphon authored Apr 29, 2012
242
f9e4d4b @slyphon Make the 1.0 changes more visible in the README.
slyphon authored Apr 30, 2012
243 * Support for 1.8.7 WILL BE *DROPPED* in v1.1. You've been warned.
244
68776ef @slyphon (belatedly) update with 0.9.1 info
slyphon authored Apr 26, 2012
245 ### v0.9.1 ###
246
247 The "Don't forget to update the RELEASES file before pushing a new release" release
248
249 * Fix a fairly bad bug in event de-duplication (diff: http://is.gd/a1iKNc)
250
251 This is fairly edge-case-y but could bite someone. If you'd set a watch
252 when doing a get that failed because the node didn't exist, any subsequent
253 attempts to set a watch would fail silently, because the client thought that the
254 watch had already been set.
255
256 We now wrap the operation in the setup_watcher! method, which rolls back the
257 record-keeping of what watches have already been set for what nodes if an
258 exception is raised.
259
260 This change has the side-effect that certain operations (get,stat,exists?,children)
261 will block event delivery until completion, because they need to have a consistent
262 idea about what events are pending, and which have been delivered. This also means
263 that calling these methods represent a synchronization point between user threads
264 (these operations can only occur serially, not simultaneously).
265
266
d0c18a7 @slyphon adding a RELEASES file to track user-facing feature changes.
slyphon authored Apr 23, 2012
267 ### v0.9.0 ###
268
269 * Default threadpool size has been changed from 5 to 1. This should only affect people who are using the Election code.
270 * `ZK::Client::Base#register` delegates to its `event_handler` for convenience (so you can write `zk.register` instead of `zk.event_handler.register`, which always irked me)
271 * `ZK::Client::Base#event_dispatch_thread?` added to more easily allow users to tell if they're currently in the event thread (and possibly make decisions about the safety of their actions). This is now used by `block_until_node_deleted` in the Unixisms module, and prevents a situation where the user could deadlock event delivery.
272 * Fixed issue 9, where using a Locker in the main thread would never awaken if the connection was dropped or interrupted. Now a `ZK::Exceptions::InterruptedSession` exception (or mixee) will be thrown to alert the caller that something bad happened.
273 * `ZK::Find.find` now returns the results in sorted order.
274 * Added documentation explaining the Pool class, reasons for using it, reasons why you shouldn't (added complexities around watchers and events).
275 * Began work on an experimental Multiplexed client, that would allow multithreaded clients to more effectively share a single connection by making all requests asynchronous behind the scenes, and using a queue to provide a synchronous (blocking) API.
276
277
31148ea @slyphon update releases file
slyphon authored Apr 26, 2012
278 # vim:ft=markdown:sts=2:sw=2:et
Something went wrong with that request. Please try again.