Skip to content
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

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

sonalsagarwal
Copy link
Contributor

No description provided.

@@ -11,6 +11,8 @@
<sslCert></sslCert>
<sslKey></sslKey>
<jdbcURL></jdbcURL>
<useConnMngr>false</useConnMngr>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useConnMngr --> useHikariPool

@@ -11,6 +11,8 @@
<sslCert></sslCert>
<sslKey></sslKey>
<jdbcURL></jdbcURL>
<useConnMngr>false</useConnMngr>
<useShortLivedConn>false</useShortLivedConn>
Copy link
Contributor

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");
Copy link
Contributor

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

Copy link
Contributor Author

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())
Copy link
Contributor

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()) {
Copy link
Contributor

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;

}

src/com/oltpbenchmark/api/Worker.java Show resolved Hide resolved
@@ -11,6 +11,8 @@
<sslCert></sslCert>
<sslKey></sslKey>
<jdbcURL></jdbcURL>
<useHikariPool>false</useHikariPool>
Copy link
Contributor

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

<sslCert></sslCert>
<sslKey></sslKey>
<jdbcURL></jdbcURL>
<useHikariPool>true</useHikariPool>
Copy link
Contributor

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

src/com/oltpbenchmark/api/Worker.java Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants