[ 
https://issues.apache.org/jira/browse/HIVE-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13286085#comment-13286085
 ] 

Ashutosh Chauhan commented on HIVE-3057:
----------------------------------------

Its probably better to do {{threadLocalMS.remove()}} instead of 
{{threadLocalMS.set(null)}} so this thread-local variable is removed from 
current thread. 
Further, these steps of cleanups only happen when client calls shutdown 
explicitly when he is done with the connection. These should also happen 
implicitly when underlying socket is closed or timed out on server side. 
Unfortunately, currently thrift doesnt give us the handle when connection is 
closed. Linking to THRIFT-1195    
                
> metastore.HiveMetaStore$HMSHandler should set the thread local raw store to 
> null in shutdown()
> ----------------------------------------------------------------------------------------------
>
>                 Key: HIVE-3057
>                 URL: https://issues.apache.org/jira/browse/HIVE-3057
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>    Affects Versions: 0.8.1, 0.9.0
>            Reporter: Feng Peng
>            Assignee: Travis Crawford
>
> The shutdown() function of metastore.HiveMetaStore$HMSHandler does not set 
> the thread local RawStore variable (in threadLocalMS) to null. Subsequent 
> getMS() calls may get the wrong RawStore object.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to