Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9CDAF200B5E for ; Wed, 10 Aug 2016 17:12:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9B6C6160A8F; Wed, 10 Aug 2016 15:12:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E0D67160AB2 for ; Wed, 10 Aug 2016 17:12:21 +0200 (CEST) Received: (qmail 95661 invoked by uid 500); 10 Aug 2016 15:12:20 -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 95517 invoked by uid 99); 10 Aug 2016 15:12:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Aug 2016 15:12:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 9D53D2C02AB for ; Wed, 10 Aug 2016 15:12:20 +0000 (UTC) Date: Wed, 10 Aug 2016 15:12:20 +0000 (UTC) From: "Ankit Singhal (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-16389) Thread leak in CoprocessorHost#getTable(TableName tableName) API MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 10 Aug 2016 15:12:22 -0000 [ https://issues.apache.org/jira/browse/HBASE-16389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ankit Singhal updated HBASE-16389: ---------------------------------- Summary: Thread leak in CoprocessorHost#getTable(TableName tableName) API (was: Thread leak in CoprocessorHost#getTable(TableName tableName)) > Thread leak in CoprocessorHost#getTable(TableName tableName) API > ---------------------------------------------------------------- > > Key: HBASE-16389 > URL: https://issues.apache.org/jira/browse/HBASE-16389 > Project: HBase > Issue Type: Bug > Reporter: Ankit Singhal > > There is a thread leak in below method, we are creating a default pool while calling > {code} > @Override > public HTableInterface getTable(TableName tableName) throws IOException { > return this.getTable(tableName, HTable.getDefaultExecutor(getConfiguration())); > } > {code} > which will never be shutdown because in HTable, we are setting this.cleanupPoolOnClose to false > {code} > @InterfaceAudience.Private > public HTable(TableName tableName, final ClusterConnection connection, > final TableConfiguration tableConfig, > final RpcRetryingCallerFactory rpcCallerFactory, > final RpcControllerFactory rpcControllerFactory, > final ExecutorService pool) throws IOException { > if (connection == null || connection.isClosed()) { > throw new IllegalArgumentException("Connection is null or closed."); > } > this.tableName = tableName; > this.cleanupConnectionOnClose = false; > this.connection = connection; > this.configuration = connection.getConfiguration(); > this.tableConfiguration = tableConfig; > this.pool = pool; > if (pool == null) { > this.pool = getDefaultExecutor(this.configuration); > this.cleanupPoolOnClose = true; > } else { > this.cleanupPoolOnClose = false; > } > {code} > resulted in pool to stay forever ,which eventually can lead other processes or the same process to starve for a threads. -- This message was sent by Atlassian JIRA (v6.3.4#6332)