Disable Hikari Connection Pool for using only YSQL Connection Manager#157
Disable Hikari Connection Pool for using only YSQL Connection Manager#157sonalsagarwal wants to merge 22 commits intomasterfrom
Conversation
config/workload_all.xml
Outdated
| <sslCert></sslCert> | ||
| <sslKey></sslKey> | ||
| <jdbcURL></jdbcURL> | ||
| <useConnMngr>false</useConnMngr> |
There was a problem hiding this comment.
useConnMngr --> useHikariPool
config/workload_all.xml
Outdated
| <sslKey></sslKey> | ||
| <jdbcURL></jdbcURL> | ||
| <useConnMngr>false</useConnMngr> | ||
| <useShortLivedConn>false</useShortLivedConn> |
There was a problem hiding this comment.
useShortLivedConn --> createConnForEveryTx
| this.dataSource = null; | ||
| if(!wrkld.getUseShortLivedConn()) { | ||
| ll_conn = benchmarkModule.makeConnection(); | ||
| System.out.println("Using connection manager for long lived connection without HikariPool"); |
There was a problem hiding this comment.
Dont use System.out.println
There was a problem hiding this comment.
this is just for debugging purpose
|
|
||
| conn = dataSource.getConnection(); | ||
| if(wrkld.getUseConnMngr()){ | ||
| if(wrkld.getUseShortLivedConn()) |
There was a problem hiding this comment.
if (connManager && shortLivedConnections)
{
conn = benchmarkModule.makeConnection();
}
else if (connManager && !shortLivedConnections) {
conn = ll_conn;
}
else {
conn = conn = dataSource.getConnection();
}
| assert (this.transactionTypes != null) : "The TransactionTypes from the WorkloadConfiguration is null!"; | ||
| try { | ||
| this.dataSource = this.benchmarkModule.getDataSource(); | ||
| if(wrkld.getUseConnMngr()) { |
There was a problem hiding this comment.
very confusing and hard to read code
if (connManager && shortLivedConnections)
{
this.dataSource = null;
ll_conn = null;
}
else if (connManager && !shortLivedConnections) {
this.dataSource = null;
ll_conn = benchmarkModule.makeConnection();;
}
else {
this.dataSource = this.benchmarkModule.getDataSource();;
ll_conn = null;
}
config/workload_all.xml
Outdated
| <sslCert></sslCert> | ||
| <sslKey></sslKey> | ||
| <jdbcURL></jdbcURL> | ||
| <useHikariPool>false</useHikariPool> |
There was a problem hiding this comment.
by default useHikariPool should be true
config/workload_all_conn_mngr.xml
Outdated
| <sslCert></sslCert> | ||
| <sslKey></sslKey> | ||
| <jdbcURL></jdbcURL> | ||
| <useHikariPool>true</useHikariPool> |
There was a problem hiding this comment.
useHikariPool should be false here
* - closing the persistent connections --------- Co-authored-by: Sonal Agarwal
No description provided.