apache/curator — pull request #7 by domwong (2014-05-21 12:49:35+00:00)
Title: Curator locks leaving dangling watches

As per https://issues.apache.org/jira/browse/CURATOR-107 . I've seen this in our services too.

The issue is because the code is using exists() call rather than getData() for creating a watch for lock. exists() creates a watch regardless of whether the node exists or not, getData() will only create the watch if node exists