Return-Path: X-Original-To: apmail-curator-dev-archive@minotaur.apache.org Delivered-To: apmail-curator-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 44E8417575 for ; Mon, 11 May 2015 19:16:00 +0000 (UTC) Received: (qmail 22193 invoked by uid 500); 11 May 2015 19:16:00 -0000 Delivered-To: apmail-curator-dev-archive@curator.apache.org Received: (qmail 22142 invoked by uid 500); 11 May 2015 19:16:00 -0000 Mailing-List: contact dev-help@curator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@curator.apache.org Delivered-To: mailing list dev@curator.apache.org Received: (qmail 22125 invoked by uid 99); 11 May 2015 19:16:00 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 May 2015 19:16:00 +0000 Date: Mon, 11 May 2015 19:15:59 +0000 (UTC) From: "Sean Busbey (JIRA)" To: dev@curator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CURATOR-208) InterProcessSemaphoreV2 swallows InterruptedException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CURATOR-208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14538472#comment-14538472 ] Sean Busbey commented on CURATOR-208: ------------------------------------- the correct thing to do is just set the thread's interrupted status (and probably log a message) > 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 > Priority: Minor > Labels: easyfix > > {{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)