Skip to content

Disable Hikari Connection Pool for using only YSQL Connection Manager#157

Open
sonalsagarwal wants to merge 24 commits into
masterfrom
disableHikariPoolForConnMngr
Open

Disable Hikari Connection Pool for using only YSQL Connection Manager#157
sonalsagarwal wants to merge 24 commits into
masterfrom
disableHikariPoolForConnMngr

Conversation

@sonalsagarwal

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread config/workload_all.xml Outdated
<sslCert></sslCert>
<sslKey></sslKey>
<jdbcURL></jdbcURL>
<useConnMngr>false</useConnMngr>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

useConnMngr --> useHikariPool

Comment thread config/workload_all.xml Outdated
<sslKey></sslKey>
<jdbcURL></jdbcURL>
<useConnMngr>false</useConnMngr>
<useShortLivedConn>false</useShortLivedConn>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

useShortLivedConn --> createConnForEveryTx

Comment thread src/com/oltpbenchmark/api/Worker.java Outdated
this.dataSource = null;
if(!wrkld.getUseShortLivedConn()) {
ll_conn = benchmarkModule.makeConnection();
System.out.println("Using connection manager for long lived connection without HikariPool");

Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread src/com/oltpbenchmark/api/Worker.java Outdated

conn = dataSource.getConnection();
if(wrkld.getUseConnMngr()){
if(wrkld.getUseShortLivedConn())

Copy link
Copy Markdown
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();
}

Comment thread src/com/oltpbenchmark/api/Worker.java Outdated
assert (this.transactionTypes != null) : "The TransactionTypes from the WorkloadConfiguration is null!";
try {
this.dataSource = this.benchmarkModule.getDataSource();
if(wrkld.getUseConnMngr()) {

Copy link
Copy Markdown
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;

}

Comment thread src/com/oltpbenchmark/api/Worker.java
Comment thread config/workload_all.xml Outdated
<sslCert></sslCert>
<sslKey></sslKey>
<jdbcURL></jdbcURL>
<useHikariPool>false</useHikariPool>

Copy link
Copy Markdown
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

Comment thread config/workload_all_conn_mngr.xml Outdated
<sslCert></sslCert>
<sslKey></sslKey>
<jdbcURL></jdbcURL>
<useHikariPool>true</useHikariPool>

Copy link
Copy Markdown
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

Comment thread src/com/oltpbenchmark/api/Worker.java
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