edulify / play-hikaricp.edulify.com

HikariCP Plugin for Playframework 2.2.x and 2.3.x
http://edulify.github.io/play-hikaricp.edulify.com/
Apache License 2.0
82 stars 35 forks source link

Bad mapping for some properties & incoherent default values #41

Closed julien-lafont closed 9 years ago

julien-lafont commented 9 years ago

Hello,

I found that some DB properties are not retrieved with the right key in PlayConfig mode.

In play-hikari

properties.setPropertyFromConfig("autoCommit",          "defaultAutoCommit", "true")
properties.setPropertyFromConfig("transactionIsolation", "defaultTransactionIsolation")
properties.setPropertyFromConfig("readOnly",             "defaultReadOnly", "false")

In play (doc) (source) :

conf.getBoolean("autocommit")
conf.getString("isolation")
conf.getBoolean("readOnly")

In addition, some default properties doesn't match with the Hikaricp or Play default values. For example :

Property Play default Hikaricp default Play-Hikaricp default
maximumPoolSize 2*5 = 10 10 1*30 = 30
minimumIdle 2*5 = 10 10 1*5 = 5

If it's an intended optimization, it should be explained in the Readme.

megazord commented 9 years ago

It is not a intended optimization. This was probably caused by outdated defaults, since play and hikari were updated without reconsidering the new defaults.

megazord commented 9 years ago

Closed in release 1.5.2

julien-lafont commented 9 years ago

Thanks for the release :)