curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jordan Zimmerman (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CURATOR-208) InterProcessSemaphoreV2 swallows InterruptedException
Date Mon, 18 Jan 2016 00:48:39 GMT

     [ https://issues.apache.org/jira/browse/CURATOR-208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jordan Zimmerman updated CURATOR-208:
-------------------------------------
    Fix Version/s: 2.9.2
                   3.0.1

> InterProcessSemaphoreV2 swallows InterruptedException
> -----------------------------------------------------
>
>                 Key: CURATOR-208
>                 URL: https://issues.apache.org/jira/browse/CURATOR-208
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Recipes
>    Affects Versions: 2.6.0, 2.7.1
>            Reporter: Alexei Osipov
>            Assignee: Jordan Zimmerman
>            Priority: Minor
>              Labels: easyfix
>             Fix For: 3.0.1, 2.9.2
>
>
> {{InterProcessSemaphoreV2}} incorrectly processes {{InterruptedException}}.
> Method `InterProcessSemaphoreV2#makeLease(final String path)` contains code block
> {code}
>                 try
>                 {
>                     client.delete().guaranteed().forPath(path);
>                 }
>                 catch ( KeeperException.NoNodeException e )
>                 {
>                     log.warn("Lease already released", e);
>                 }
>                 catch ( Exception e )
>                 {
>                     throw new IOException(e);
>                 }
> {code}
> The problem is that code in {{try}} block may throw an {{InterruptedException}} and this
exception gets wrapped into {{IOException}} so it becomes very problematic to handle it properly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message