[ https://issues.apache.org/jira/browse/HIVE-23830?focusedWorklogId=457211&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-457211 ]
ASF GitHub Bot logged work on HIVE-23830: ----------------------------------------- Author: ASF GitHub Bot Created on: 10/Jul/20 15:54 Start Date: 10/Jul/20 15:54 Worklog Time Spent: 10m Work Description: mustafaiman commented on a change in pull request #1235: URL: https://github.com/apache/hive/pull/1235#discussion_r452929806 ########## File path: ql/src/java/org/apache/hadoop/hive/ql/DriverTxnHandler.java ########## @@ -553,11 +553,13 @@ private void release(boolean releaseLocks) { LOG.warn("Exception when releasing locking in destroy: " + e.getMessage()); } } - ShutdownHookManager.removeShutdownHook(shutdownRunner); + ShutdownHookManager.removeShutdownHook(txnRollbackRunner); } void releaseLocksAndCommitOrRollback(boolean commit) throws LockException { Review comment: I would not rename to `commitAndCleanup` because this method also rolls back transaction. I'll rename it to `endTransactionAndCleanup` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 457211) Time Spent: 1h (was: 50m) > Remove shutdownhook after query is completed > -------------------------------------------- > > Key: HIVE-23830 > URL: https://issues.apache.org/jira/browse/HIVE-23830 > Project: Hive > Issue Type: Bug > Reporter: Mustafa Iman > Assignee: Mustafa Iman > Priority: Major > Labels: pull-request-available > Time Spent: 1h > Remaining Estimate: 0h > > Each query registers a shutdownHook to release transactional resources in > case JVM shuts down mid query. These hooks are not cleaned up until session > is closed. Session life time is unbounded. So these hooks are a memory leak. > They should be cleaned as soon as transaction is completed. -- This message was sent by Atlassian Jira (v8.3.4#803005)