[
https://issues.apache.org/jira/browse/CURATOR-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14619122#comment-14619122
]
ASF GitHub Bot commented on CURATOR-218:
----------------------------------------
GitHub user madrob opened a pull request:
https://github.com/apache/curator/pull/88
CURATOR-218 Reorder ConnectionState process event
Address a race condition in ConnectionState.process where it will
trigger watchers first before updating its own state. This can lead to
inconsistencies when blocking until connected.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/madrob/curator CURATOR-218
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/curator/pull/88.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 #88
----
commit 4d9eace865d88d0213b07e3c22ae93d36bcdf84e
Author: Mike Drob <[email protected]>
Date: 2015-07-08T16:04:30Z
CURATOR-218 Reorder ConnectionState process event
Address a race condition in ConnectionState.process where it will
trigger watchers first before updating its own state. This can lead to
inconsistencies when blocking until connected.
----
> Race condition in client.blockUntilConnected()
> ----------------------------------------------
>
> Key: CURATOR-218
> URL: https://issues.apache.org/jira/browse/CURATOR-218
> Project: Apache Curator
> Issue Type: Bug
> Components: Recipes
> Affects Versions: 2.7.0, 2.7.1, 2.8.0
> Environment: host: AWS EC2 t2.medium type
> uname -a = Linux bamboo-agent 3.13.0-44-generic #73-Ubuntu SMP Tue Dec 16
> 00:22:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
> lsb_release -a =
> Distributor ID: Ubuntu
> Description: Ubuntu 14.04.1 LTS
> Release: 14.04
> Codename: trusty
> ZK version: is a curator TestingServer
> java: java 8
> maven: 3.2.5
> Reporter: Samuel García Martínez
> Assignee: Jordan Zimmerman
> Attachments: failing_test.txt
>
>
> I'm implementing a Guava service relying on the startAsync feature. I'm using
> a listener to wait for the INITIALIZED event to fire the guava service
> notifyStarted method, but sometimes the listener never receives the event if
> the root path does not exist.
> I've created a repository with a failing test (looping over the failing test
> to force it).
> repo with tests:
> https://github.com/samuelgmartinez/curator-treecache-tests.git
> failing test: mvn -Dtest=TreeCacheTest#testListenerNonExistentRootLoop test
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)