dengzhhu653 commented on code in PR #3817:
URL: https://github.com/apache/hive/pull/3817#discussion_r1037716652


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java:
##########
@@ -375,8 +375,13 @@ public void setConf(Configuration conf){
           connPool = setupJdbcConnectionPool(conf, maxPoolSize);
         }
         if (connPoolMutex == null) {
-          configurator.resetName("mutex");
-          connPoolMutex = setupJdbcConnectionPool(conf, maxPoolSize);
+          // It's kind of a waste to create a fixed size connection pool as 
same as the connPool and
+          // the connection pool used in ObjectStore, and the connection pool 
is mostly used for MutexAPI that
+          // is primarily designed to provide coarse-grained mutex support to 
maintenance tasks running inside
+          // the Metastore, we only use getConnection method to retrieve 
connection from this pool,
+          // changing it to NoPoolConnectionPool will make Metastore more 
scalable especially
+          // there is a leader in the warehouse.

Review Comment:
   > @dengzhhu653 , thank you for the patch. I think this looks like a good 
idea overall. I just entered a minor comment about a possible typo.
   > 
   > However, we are also dependent on the connection pool for some other 
capabilities. For example, both 
[DbCPDataSourceProvider](https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/datasource/DbCPDataSourceProvider.java#L103)
 and 
[HikariCPDataSourceProvider](https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/datasource/HikariCPDataSourceProvider.java#L76)
 apply a connection timeout. After the switch to `NoPoolConnectionPool`, would 
we no longer be enforcing a connection timeout?
   
   Good catch, it makes sense to enforce a connection timeout. Thank you for 
the suggestion! 



-- 
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