Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-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 EDF8C110B7 for ; Tue, 17 Jun 2014 18:39:07 +0000 (UTC) Received: (qmail 9549 invoked by uid 500); 17 Jun 2014 18:39:07 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 9481 invoked by uid 500); 17 Jun 2014 18:39:07 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 9470 invoked by uid 500); 17 Jun 2014 18:39:07 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 9467 invoked by uid 99); 17 Jun 2014 18:39:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jun 2014 18:39:07 +0000 Date: Tue, 17 Jun 2014 18:39:07 +0000 (UTC) From: "Alan Gates (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-7225) Unclosed Statement's in TxnHandler 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/HIVE-7225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14034192#comment-14034192 ] Alan Gates commented on HIVE-7225: ---------------------------------- No. We aren't leaving these connections open for a long time. We're closing them quite quickly at the end of each Thrift RPC. If we were leaving them open for a long time then I would agree that it was important to close the statements. > Unclosed Statement's in TxnHandler > ---------------------------------- > > Key: HIVE-7225 > URL: https://issues.apache.org/jira/browse/HIVE-7225 > Project: Hive > Issue Type: Bug > Reporter: Ted Yu > Assignee: steve, Oh > Attachments: HIVE-7225.1.patch > > > There're several methods in TxnHandler where Statement (local to the method) is not closed upon return. > Here're a few examples: > In compact(): > {code} > stmt.executeUpdate(s); > LOG.debug("Going to commit"); > dbConn.commit(); > {code} > In showCompact(): > {code} > Statement stmt = dbConn.createStatement(); > String s = "select cq_database, cq_table, cq_partition, cq_state, cq_type, cq_worker_id, " + > "cq_start, cq_run_as from COMPACTION_QUEUE"; > LOG.debug("Going to execute query <" + s + ">"); > ResultSet rs = stmt.executeQuery(s); > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)