Aggarwal-Raghav commented on code in PR #6042:
URL: https://github.com/apache/hive/pull/6042#discussion_r2453997059


##########
standalone-metastore/metastore-client/src/main/java/org/apache/hadoop/hive/metastore/client/ThriftHiveMetaStoreClient.java:
##########
@@ -763,6 +763,8 @@ private void open() throws MetaException {
           LOG.error(errMsg, e);
         }
         if (isConnected) {
+          // Set the beeline session modified metaConfVars for new HMS 
connection
+          overlaySessionModifiedMetaConf();

Review Comment:
   If the connection between HiveServer2 and the Hive Metastore is dropped, 
subsequent HMS calls invoke `org.apache.hadoop.hive.ql.metadata.Hive#getMSC()`. 
Because the `forceCreate` parameter is **false**, the existing 
`metaStoreClient` instance is reused rather than a new one being created.
   The client's recovery logic only re-attempts the underlying thrift 
connection via 
`org.apache.hadoop.hive.metastore.client.ThriftHiveMetaStoreClient#open()`. 
Once this connection is re-established, the standard code path does not provide 
an opportunity to set the modified session-level metaconf.
   Therefore, `overlaySessionModifiedMetaConf` is explicitly called immediately 
after a successful reconnection to ensure the session's modified configuration 
is correctly applied to the newly established HMS 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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to