[ https://issues.apache.org/jira/browse/HIVE-7225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14036377#comment-14036377 ]
Alan Gates commented on HIVE-7225: ---------------------------------- Interesting, since part of the contract of Connection.close is "Releases this Connection object's database and JDBC resources immediately instead of waiting for them to be automatically released." it's disappointing to see that connection pooling technologies may not be doing this. Any info on whether the default is to close the open statements or leave them open? We could add a call to configure the pool to make sure we close the open statements. Separately, in HIVE-7246 I'm working to make the connection pooling configurable, so rather than make sure we handle this for each pool type it makes more sense to do as you suggest and make sure we close the statements. So I remove my question on whether this makes sense to do. > 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)