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 2022/12/22 14:49:40 UTC

[GitHub] [hive] deniskuzZ commented on a diff in pull request #3817: HIVE-26794: Explore retiring TxnHandler#connPoolMutex idle connections

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


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/datasource/HikariCPDataSourceProvider.java:
##########
@@ -72,6 +72,17 @@ public DataSource create(Configuration hdpConfig, int maxPoolSize) throws SQLExc
       config.setPoolName(poolName);
     }
 
+    // It's kind of a waste to create a fixed size connection pool as same as the TxnHandler#connPool,
+    // TxnHandler#connPoolMutex is mostly used for MutexAPI that is primarily designed to
+    // provide coarse-grained mutex support to maintenance tasks running inside the Metastore,
+    // add minimumIdle=2 and idleTimeout=5min to the pool, so that the connection pool can retire
+    // the idle connection aggressively, this will make Metastore more scalable especially if
+    // there is a leader in the warehouse.
+    if ("mutex".equals(poolName)) {

Review Comment:
   Could we please extract the string literal into constants?



-- 
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: gitbox-unsubscribe@hive.apache.org

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