-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable Hikari Connection Pool for using only YSQL Connection Manager #157
base: master
Are you sure you want to change the base?
Conversation
config/workload_all.xml
Outdated
@@ -11,6 +11,8 @@ | |||
<sslCert></sslCert> | |||
<sslKey></sslKey> | |||
<jdbcURL></jdbcURL> | |||
<useConnMngr>false</useConnMngr> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useConnMngr --> useHikariPool
config/workload_all.xml
Outdated
@@ -11,6 +11,8 @@ | |||
<sslCert></sslCert> | |||
<sslKey></sslKey> | |||
<jdbcURL></jdbcURL> | |||
<useConnMngr>false</useConnMngr> | |||
<useShortLivedConn>false</useShortLivedConn> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dont use System.out.println
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just for debugging purpose
|
||
conn = dataSource.getConnection(); | ||
if(wrkld.getUseConnMngr()){ | ||
if(wrkld.getUseShortLivedConn()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (connManager && shortLivedConnections)
{
conn = benchmarkModule.makeConnection();
}
else if (connManager && !shortLivedConnections) {
conn = ll_conn;
}
else {
conn = conn = dataSource.getConnection();
}
@@ -81,7 +81,15 @@ public Worker( | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -11,6 +11,8 @@ | |||
<sslCert></sslCert> | |||
<sslKey></sslKey> | |||
<jdbcURL></jdbcURL> | |||
<useHikariPool>false</useHikariPool> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useHikariPool should be false here
* - closing the persistent connections --------- Co-authored-by: Sonal Agarwal
No description provided.