kazoo
kazoo copied to clipboard
Cleanup lock paths
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?
It seems fine with me, wanna do a PR?
btw this might be obsoleted by #334, depending on if you want to support older versions of ZK.