[ 
https://issues.apache.org/jira/browse/HIVE-26794?focusedWorklogId=830495&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-830495
 ]

ASF GitHub Bot logged work on HIVE-26794:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Dec/22 01:52
            Start Date: 02/Dec/22 01:52
    Worklog Time Spent: 10m 
      Work Description: dengzhhu653 commented on code in PR #3817:
URL: https://github.com/apache/hive/pull/3817#discussion_r1037717738


##########
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:
   yea, I think I miss it.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 830495)
    Time Spent: 1h 20m  (was: 1h 10m)

> Explore changing TxnHandler#connPoolMutex to NoPoolConnectionPool
> -----------------------------------------------------------------
>
>                 Key: HIVE-26794
>                 URL: https://issues.apache.org/jira/browse/HIVE-26794
>             Project: Hive
>          Issue Type: Improvement
>          Components: Standalone Metastore
>            Reporter: Zhihua Deng
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Instead of creating a fixed size connection pool for TxnHandler#MutexAPI, the 
> pool can be assigned to NoPoolConnectionPool due to: 
>  * TxnHandler#MutexAPI is primarily designed to provide coarse-grained mutex 
> support to maintenance tasks running inside the Metastore, these tasks are 
> not user faced;
>  * A fixed size connection pool as same as the pool used in ObjectStore is a 
> waste for other non leaders in the warehouse; 
> The NoPoolConnectionPool provides connection on demand, and 
> TxnHandler#MutexAPI only uses getConnection method to fetch a connection from 
> the pool, so it's doable to change the pool to NoPoolConnectionPool, this 
> would make the HMS more scaleable.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to