mszurap commented on code in PR #5764:
URL: https://github.com/apache/hive/pull/5764#discussion_r2042127429


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/PersistenceManagerProvider.java:
##########
@@ -315,9 +315,12 @@ private static PersistenceManagerFactory 
initPMF(Configuration conf, boolean for
         databaseProduct = DatabaseProduct.determineDatabaseProduct(ds, conf);
         // The secondary connection factory is used for schema generation, and 
for value generation operations.
         // We should use a different pool for the secondary connection factory 
to avoid resource starvation.
-        // Since DataNucleus uses locks for schema generation and value 
generation, 2 connections should be sufficient.
+        // DataNucleus uses locks for schema generation and value generation, 
under normal circumstances 2 connections
+        // should be sufficient. However, as found in HIVE-28839 in certain 
situations connection starvation may happen,
+        // so we need to make this configurable until a final fix is not 
available.

Review Comment:
   Thanks @zabetak for the suggestions. I agree, removed the confusing 
comments/descriptions and renamed the property to 
"datanucleus.connectionPool.secondary.maxPoolSize".
   Added a new testcase TestDataSourceProviderFactory#testHikariCpMaxPoolSize, 
it tests the HikariCP pool sizes only. I could not write a testcase for the 
DBCP as it does not expose the pool's properties and did not want to use 
reflection, but let me know if that is also okay.



-- 
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-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to