curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thecoop <...@git.apache.org>
Subject [GitHub] curator pull request #186: [CURATOR-375] - fix thread interruption being rep...
Date Thu, 05 Jan 2017 14:14:40 GMT
GitHub user thecoop opened a pull request:

    https://github.com/apache/curator/pull/186

    [CURATOR-375] - fix thread interruption being reported twice

    In some classes, thread interruption was being reported twice - by setting the thread
interrupted flag and re-throwing the `InterruptedException` - this made it look like the thread
was actually interrupted twice, and generally causes spurious interruption - even if the `InterruptedException`
is handled, the thread interruption status is still set, meaning the next async operation
that happens will also fail.
    
    Affected classes:
    - `ConnectionState` - `closeAndClear` can never throw `InterruptedException` canyway,
so remove the check completely
    - `PersistentNode` - as mentioned in the docs for `AutoCloseable`, close methods shouldn't
throw InterruptedException anyway. The delete operation is guaranteed, so even if `deleteNode`
throws an exception, the node will still (probably) be deleted
    - `CreateBuilderImpl`/`DeleteBuilderImpl` - the exception is being re-thrown, so don't
need to re-set the interrupt status

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/thecoop/curator CURATOR-375

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/curator/pull/186.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 #186
    
----
commit 81edd7e07a1fae2412c3e42e74a31b992aa72669
Author: Simon Cooper <simon.cooper@featurespace.co.uk>
Date:   2017-01-05T14:08:17Z

    CURATOR-375 - fix thread interruption being reported using thread interrupted flag and
an exception at the same time

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message