OK - I found the problem. There are 2 bugs here. ONe is actually a problem in Curator itself, not necessarily the RPC proxy. It takes some time for the LeaderLatch recipe to create the parent nodes. If you call getLeaderParticipants too soon ZooKeeper throws a NoNode exception. The second bug is in the RPC proxy. For some reason, the NoNode exception is not getting returned to the client.
Please open issues for these: https://issues.apache.org/jira/browse/CURATOR On October 26, 2014 at 3:28:55 PM, Jens Weggemann ([email protected]) wrote: Hi everyone, I've been trying to use Curator through its RPC proxy from C++ on Windows. Things seemed to work fine, but now I keep getting into an exception when I call getLeaderParticipants() after startLeaderSelector(). This only seems to happen when the node for the election path (/my-election) has not existed before so I guess I could work around it by creating the node beforehand. But I'd really like to understand what's going on here. I broke it down a minimal example that doesn't even call getNextEvent() to avoid the 2nd thread. The code is at https://gist.github.com/jweg/9328fe850aa4ece9d4d6 along with the exception and the log. I'm using zookeeper 3.5.0-alpha and recent masters of curator and thrift. Do I do something wrong or could this be a bug? In what? Thanks a lot, Jens
