GitHub user Randgalt opened a pull request:
https://github.com/apache/curator/pull/297
[CURATOR-495] Fixes race in many Curator recipes which could block ZK's
event thread
Fixes race in many Curator recipes whereby a pattern was used that called
"notifyAll" in a synchronized block in response to a ZooKeeper watcher
callback. This created a race and possible deadlock if the recipe instance was
already in a synchronized block. This would result in the ZK event thread
getting blocked which would prevent ZK connections from getting repaired. This
change adds a new executor (available from CuratorFramework) that can be used
to do the sync/notify so that ZK's event thread is not blocked.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/curator CURATOR-495
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/curator/pull/297.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #297
----
commit f91adb22e83d8e47b99ad98f8c13c86251bc4cb3
Author: randgalt <randgalt@...>
Date: 2018-12-14T01:34:40Z
CURATOR-495
Fixes race in many Curator recipes whereby a pattern was used that called
"notifyAll" in a synchronized block in response to a ZooKeeper watcher
callback. This created a race and possible deadlock if the recipe instance was
already in a synchronized block. This would result in the ZK event thread
getting blocked which would prevent ZK connections from getting repaired. This
change adds a new executor (available from CuratorFramework) that can be used
to do the sync/notify so that ZK's event thread is not blocked.
----
---