[ https://issues.apache.org/jira/browse/HIVE-13885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15307417#comment-15307417 ]
Rajat Khandelwal commented on HIVE-13885: ----------------------------------------- Will just a logical explanation of why this change makes sense. HiveSessionImpl has a SessionState object (will call the instance sessionState). And on HiveSessionImpl.release, sessionState.resetThreadNames() is called, but the call is protected by null check on sessionState object. Now in close, we are doing sessionState.close(); sessionState = null; this.release;. The last call would have reset the thread name, if the sessionState wasn't made null just before it. Thread names are updated on acquire and reset on release. In close, we are doing one acquire call at the beginning, and one release call at the end, which means that the thread name will be updated but not reset (since sessionState has been made null before release call). So every thread that tries to close a session, has an extra id appended to its name which never gets removed. Hence the thread names keep growing and the logs are flooded with thread names. > Hive session close is not resetting thread name > ----------------------------------------------- > > Key: HIVE-13885 > URL: https://issues.apache.org/jira/browse/HIVE-13885 > Project: Hive > Issue Type: Bug > Reporter: Rajat Khandelwal > Assignee: Rajat Khandelwal > Fix For: 2.1.0 > > Attachments: HIVE-13885.patch > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)