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 183EF18CA7 for ; Wed, 12 Aug 2015 07:11:46 +0000 (UTC) Received: (qmail 82678 invoked by uid 500); 12 Aug 2015 07:11:45 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 82631 invoked by uid 500); 12 Aug 2015 07:11:45 -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 82616 invoked by uid 99); 12 Aug 2015 07:11:45 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Aug 2015 07:11:45 +0000 Date: Wed, 12 Aug 2015 07:11:45 +0000 (UTC) From: "Jingcheng Du (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-13480) ShortCircuitConnection doesn't short-circuit all calls as expected 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/HBASE-13480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14693043#comment-14693043 ] Jingcheng Du commented on HBASE-13480: -------------------------------------- bq. I'm wondering if Enis' suggestion of ConnectionAdapter extending ConnectionImplementation instead is the less-error-prone approach I think it's not necessary. We need a ClusterConnection instance, not a ConnectionImplementation instance (what if there is a new implementation of ClusterConnection?). If ConnectionAdapter has to be limited to ConnectionImplementation. it's better to have the switch ( using local or remote instance) directly in ConnectionImplementation instead? > ShortCircuitConnection doesn't short-circuit all calls as expected > ------------------------------------------------------------------ > > Key: HBASE-13480 > URL: https://issues.apache.org/jira/browse/HBASE-13480 > Project: HBase > Issue Type: Bug > Components: Client > Affects Versions: 1.0.0, 2.0.0, 1.1.0 > Reporter: Josh Elser > Assignee: Josh Elser > Fix For: 2.0.0, 1.3.0, 1.2.1, 1.0.3, 1.1.3 > > > Noticed the following situation in debugging unexpected unit tests failures in HBASE-13351. > {{ConnectionUtils#createShortCircuitHConnection(Connection, ServerName, AdminService.BlockingInterface, ClientService.BlockingInterface)}} is intended to avoid the extra RPC by calling the server's instantiation of the protobuf rpc stub directly for the AdminService and ClientService. > The problem is that this is insufficient to actually avoid extra "remote" RPCs as all other calls to the Connection are routed to a "real" Connection instance. As such, any object created by the "real" Connection (such as an HTable) will use the real Connection, not the SSC. > The end result is that {{MasterRpcService#reportRegionStateTransition(RpcController, ReportRegionStateTransitionRequest)}} will make additional "remote" RPCs over what it thinks is an SSC through a {{Get}} on {{HTable}} which was constructed using the SSC, but the {{Get}} itself will use the underlying real Connection instead of the SSC. With insufficiently sized thread pools, this has been observed to result in RPC deadlock in the HMaster where an RPC attempts to make another RPC but there are no more threads available to service the second RPC so the first RPC blocks indefinitely. -- This message was sent by Atlassian JIRA (v6.3.4#6332)