Commit e2de2e3
Avoid leaking Zookeeper znodes in tryLock
Creating a EPHEMERAL_SEQUENTIAL node was being used to ensure the
Zookeeper connection had been established. These were never explicitly
removed, which led to tryLock effectively leaking zNodes until the
client was terminated. This in turn lead to an extremely large number of
ephemeral nodes being deleted whenever a long running service
terminated!
This fix replaces the creation of a node with a stat of "/" instead.
This has the desired effect of re-establishing the Zookeeper connection,
but is a read-only operation.
* Remove unused import
(cherry picked from commit 47a74ab)1 parent 424bf91 commit e2de2e3
File tree
1 file changed
+6
-11
lines changed- spring-integration-zookeeper/src/main/java/org/springframework/integration/zookeeper/lock
1 file changed
+6
-11
lines changedLines changed: 6 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
281 | 280 | | |
282 | 281 | | |
283 | 282 | | |
284 | | - | |
| 283 | + | |
285 | 284 | | |
286 | 285 | | |
287 | 286 | | |
288 | | - | |
| 287 | + | |
289 | 288 | | |
290 | 289 | | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
| 290 | + | |
| 291 | + | |
297 | 292 | | |
298 | 293 | | |
299 | 294 | | |
300 | 295 | | |
301 | 296 | | |
302 | 297 | | |
303 | | - | |
| 298 | + | |
304 | 299 | | |
305 | | - | |
| 300 | + | |
306 | 301 | | |
307 | 302 | | |
308 | 303 | | |
| |||
0 commit comments