Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4606BD51C for ; Mon, 12 Nov 2012 08:48:17 +0000 (UTC) Received: (qmail 90407 invoked by uid 500); 12 Nov 2012 08:48:14 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 90290 invoked by uid 500); 12 Nov 2012 08:48:14 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 90004 invoked by uid 99); 12 Nov 2012 08:48:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Nov 2012 08:48:13 +0000 Date: Mon, 12 Nov 2012 08:48:13 +0000 (UTC) From: =?utf-8?Q?Trym_M=C3=B8ller_=28JIRA=29?= To: dev@lucene.apache.org Message-ID: <616208791.99658.1352710093854.JavaMail.jiratomcat@arcas> In-Reply-To: <2098741797.99639.1352709612473.JavaMail.jiratomcat@arcas> Subject: [jira] [Updated] (SOLR-4066) SolrZKClient changed interface MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-4066?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:all-tabpanel ] Trym M=C3=B8ller updated SOLR-4066: ------------------------------ Description:=20 The constructor of SolrZKClient has changed, I expect to ensure clean up of= resources. The strategy is as follows: {code} connManager =3D new ConnectionManager(...) try { ... } catch (Throwable e) { connManager.close(); throw new RuntimeException(); } try { connManager.waitForConnected(clientConnectTimeout); } catch (Throwable e) { connManager.close(); throw new RuntimeException(); } {code} This results in a different exception (RuntimeException) returned from the = constructor as earlier (nice exceptions as UnknownHostException, TimeoutExc= eption). Can this be changed so we keep the old nice exceptions e.g. as follows (req= uiring the constructor to declare these) or at least include them as cause = in the RuntimeException? {code} boolean closeBecauseOfException =3D true; try { ... connManager.waitForConnected(clientConnectTimeout); closeBecauseOfException =3D false } finally { if (closeBecauseOfException) { connManager.close(); } }=20 {code} was: The constructor of SolrZKClient has changed, I expect to ensure clean up of= resources. The strategy is as follows: {code} connManager =3D new ConnectionManager(...) try { ... } catch (Throwable e) { connManager.close(); throw new RuntimeException(); } try { connManager.waitForConnected(clientConnectTimeout); } catch (Throwable e) { connManager.close(); throw new RuntimeException(); } {code} This results in a different exception (RuntimeException) returned from the = constructor as earlier (nice exceptions as UnknownHostException, TimeoutExc= eption). Can this be changed so we keep the old nice exceptions e.g. as follows (req= uiring the constructor to declare these) or at least include them as cause = in the RuntimeException? {code} boolean closeBecauseOfException =3D true; try { ... connManager.waitForConnected(clientConnectTimeout); closeBecauseOfException =3D false } finally { if (closeBecauseOfException) { connManager.close(); } }=20 {code} =20 > SolrZKClient changed interface > ------------------------------ > > Key: SOLR-4066 > URL: https://issues.apache.org/jira/browse/SOLR-4066 > Project: Solr > Issue Type: Bug > Components: SolrCloud > Affects Versions: 4.0, 4.0.1, 4.1 > Environment: Any > Reporter: Trym M=C3=B8ller > Priority: Minor > > The constructor of SolrZKClient has changed, I expect to ensure clean up = of resources. The strategy is as follows: > {code} > connManager =3D new ConnectionManager(...) > try { > ... > } catch (Throwable e) { > connManager.close(); > throw new RuntimeException(); > } > try { > connManager.waitForConnected(clientConnectTimeout); > } catch (Throwable e) { > connManager.close(); > throw new RuntimeException(); > } > {code} > This results in a different exception (RuntimeException) returned from th= e constructor as earlier (nice exceptions as UnknownHostException, TimeoutE= xception). > Can this be changed so we keep the old nice exceptions e.g. as follows (r= equiring the constructor to declare these) or at least include them as caus= e in the RuntimeException? > {code} > boolean closeBecauseOfException =3D true; > try { > ... > connManager.waitForConnected(clientConnectTimeout); > closeBecauseOfException =3D false > } finally { > if (closeBecauseOfException) { > connManager.close(); > } > }=20 > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org