Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D3AC6E596 for ; Wed, 30 Jan 2013 00:57:13 +0000 (UTC) Received: (qmail 55623 invoked by uid 500); 30 Jan 2013 00:57:13 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 55572 invoked by uid 500); 30 Jan 2013 00:57:13 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 55563 invoked by uid 99); 30 Jan 2013 00:57:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2013 00:57:13 +0000 Date: Wed, 30 Jan 2013 00:57:13 +0000 (UTC) From: "Andrew Purtell (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-7685) Closing socket connection can't be removed from SecureClient 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/HBASE-7685?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Purtell updated HBASE-7685: ---------------------------------- Status: Patch Available (was: Open) =20 > Closing socket connection can't be removed from SecureClient > ------------------------------------------------------------ > > Key: HBASE-7685 > URL: https://issues.apache.org/jira/browse/HBASE-7685 > Project: HBase > Issue Type: Bug > Components: security > Affects Versions: 0.94.3 > Reporter: cuijianwei > Assignee: cuijianwei > Fix For: 0.94.5 > > Attachments: closing_socket_connection_not_removed_in_secure_clie= nt.diff, HBASE-7685-0.94.txt > > > We found many IOExceptions naming "Call # not added as the connection # i= s closing" when using SecureClient to access hbase. From the source code of= SecureClient, we found there may be bug in close() method of SecureClient.= The following is the current logic in close() method of SecureClient=EF=BC= =9A > {code} > // release the resources > // first thing to do;take the connection out of the connection list > synchronized (connections) { > if (connections.get(remoteId) =3D=3D this) { > connections.remove(remoteId); > } > } > {code} > However, connections are managed by PoolMap=EF=BC=9B therefore, if more t= han one connection are created for the same remoteId, the 'if condition' ma= y not be satisfied because the default PoolType is RoundRobin. This could b= e cause a closing state connection can't be removed from connections, makin= g new calls which use such connections will always throws IOException namin= g "connection is closing". > We can use logic from close() method of HBaseClient to resolve the proble= m: > {code} > // release the resources > // first thing to do;take the connection out of the connection list > synchronized (connections) { > connections.remove(remoteId, this); > } > {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