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

Update HikariCP and other dependencies #1821

Merged
merged 3 commits into from Mar 26, 2018
Merged

Update HikariCP and other dependencies #1821

merged 3 commits into from Mar 26, 2018

Conversation

marcospereira
Copy link
Contributor

@marcospereira marcospereira commented Dec 4, 2017

This PR includes updates for the following dependencies:

  1. HikariCP from 2.5.1 to 2.7.4: fixes Update HikariCP to version 2.7.2 and fix deprecation warnings #1812
  2. Scala 2.11.8 to 2.11.12: replaces Scala 2.11.8 -> 2.11.12 #1817

@marcospereira marcospereira changed the title Update dependencies Update HikariCP and other dependencies Dec 5, 2017
c.getBooleanOpt("autoCommit").foreach(hconf.setAutoCommit)

val numThreads = c.getIntOr("numThreads", 20)

hconf.setConnectionTimeout(c.getMillisecondsOr("connectionTimeout", 1000))
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 one of the places where Slick is not using HikariCP defaults. While Slick uses 1 second, Hikari defaults to 30 seconds.

Should Slick respect HikariCP default?

.map("TRANSACTION_" + _)
.foreach(hconf.setTransactionIsolation)

hconf.setValidationTimeout(c.getMillisecondsOr("validationTimeout", 1000))
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 another place where Slick is not using HikariCP defaults (5 seconds).

// `initializationFailTimeout`. See HikariCP docs for more information:
// https://github.com/brettwooldridge/HikariCP#infrequently-used
// But we still respect the value if it configured.
c.getBooleanOpt("initializationFailFast").foreach(hconf.setInitializationFailFast)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Effectively avoids the log warning. Also, initializationFailTimeout overrides it if both are present.

* database is still alive. It is database dependent and should be a query that takes very
* little processing by the database (e.g. "VALUES 1"). When not set, the JDBC4
* `Connection.isValid()` method is used instead (which is usually preferable).</li>
* <li>Essentials:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changes the docs organization and add docs to the HikariCP configurations added. But most of the content is untouched.

@hvesalai hvesalai added this to the Next feature release milestone Feb 28, 2018
@TimMoore
Copy link

TimMoore commented Mar 5, 2018

@marcospereira unfortunately, this now conflicts with master. Would you be able to rebase?

@hvesalai hvesalai modified the milestones: Future feature release, 3.3 Mar 7, 2018
This includes updates for the following dependencies:

1. HikariCP from 2.5.1 to 2.7.4: fixes #1812
2. sbt to version 0.13.16: replaces #1799
3. Scala 2.11.8 to 2.11.12: replaces #1817
Most relevant changes:

1. initializationFailFast is now handled as an optional configuration.
   If it is not present, then no warning is printed.
2. Some keys such as `url`, `user` and `driver` now supports the HikariCP
   names like `jdbcUrl`, `username` and `driverClassName`.
3. Change documentation to separate required, frenquently used and
   infrenquetly used configurations.
It is the current default behavior with `initializationFailFast` so
`initializationFailTimeout` needs to be configured to -1 by default
to keep the existing behavior.
@hvesalai hvesalai merged commit 46d6f47 into slick:master Mar 26, 2018
@marcospereira marcospereira deleted the update-deps branch June 20, 2018 03:31
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.

Update HikariCP to version 2.7.2 and fix deprecation warnings
3 participants