Description
I have a server which is using the PathChildrenCache with the LeaderSelector so that I can keep track of changes in leadership for a particular znode. Upon closing the PathChildrenCache, I intermittently receive an InterruptedException like the following:
java.lang.InterruptedException at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1038) at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1326) at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:282) at org.apache.curator.CuratorZookeeperClient.internalBlockUntilConnectedOrTimedOut(CuratorZookeeperClient.java:324) at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:105) at org.apache.curator.utils.EnsurePath$InitialHelper.ensure(EnsurePath.java:140) at org.apache.curator.utils.EnsurePath.ensure(EnsurePath.java:99) at org.apache.curator.framework.recipes.cache.PathChildrenCache.refresh(PathChildrenCache.java:481) at org.apache.curator.framework.recipes.cache.RefreshOperation.invoke(RefreshOperation.java:35) at org.apache.curator.framework.recipes.cache.PathChildrenCache$10.run(PathChildrenCache.java:762) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724)
It doesn't happen all the time but it does happen about 2-3 times in a test suite that's creating and stopping the server about 60 times total.
randgalt mentioned on the mailing list that this may be a bug in the framework.