[ 
https://issues.apache.org/jira/browse/HIVE-23830?focusedWorklogId=457007&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-457007
 ]

ASF GitHub Bot logged work on HIVE-23830:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Jul/20 06:19
            Start Date: 10/Jul/20 06:19
    Worklog Time Spent: 10m 
      Work Description: pvary commented on a change in pull request #1235:
URL: https://github.com/apache/hive/pull/1235#discussion_r452643677



##########
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 do not have better idea than separate out to a cleanup method. I was 
hoping you come up with a golden one :)
   Doing cleanup in something called as "releaseLocksAndCommitOrRollback" is 
definitely not a good idea IMHO.




----------------------------------------------------------------
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:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 457007)
    Time Spent: 40m  (was: 0.5h)

> 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: 40m
>  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)

Reply via email to