You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/05/14 17:00:50 UTC

[GitHub] [hive] scarlin-cloudera commented on a change in pull request #2238: HIVE-25085: MetaStore Clients no longer shared across sessions.

scarlin-cloudera commented on a change in pull request #2238:
URL: https://github.com/apache/hive/pull/2238#discussion_r632669443



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java
##########
@@ -1869,7 +1874,10 @@ public void close() throws IOException {
       unCacheDataNucleusClassLoaders();
     } finally {
       // removes the threadlocal variables, closes underlying HMS connection
-      Hive.closeCurrent();
+      if (hiveDb != null) {
+        hiveDb.close(true);

Review comment:
       That's correct.  The original design set the "allowClose" variable to false since there is cleanup logic when a thread dies that could close the session.  Since this is explicitly called at session close time, we can safely close the connection.




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org