kazoo icon indicating copy to clipboard operation
kazoo copied to clipboard

Cleanup lock paths

Open maximilize opened this issue 10 years ago • 2 comments

We are using the lock recipe for millions of objects so we have to create a unique lock name for each object. Since the lock recipe does not delete the path this will mess up zookeeper after a short time.

My suggestion is to have an option to try to delete the path after the lock is released. This can lead to race conditions between ensure_path and the ephemeral node creation so have to do more changes to the recipe.

What do you guys think? Is there another way we can prevent messing up zookeeper with our millions of different locks?

maximilize avatar May 28 '15 10:05 maximilize

It seems fine with me, wanna do a PR?

harlowja avatar May 28 '15 18:05 harlowja

btw this might be obsoleted by #334, depending on if you want to support older versions of ZK.

radix avatar Jul 02 '15 06:07 radix