hawklike
03/21/2022, 4:01 PMprivate fun hikari(): HikariDataSource {
val config = HikariConfig()
config.driverClassName = "your db driver"
config.jdbcUrl = "your jdbcUrl"
config.maximumPoolSize = 3
config.isAutoCommit = false //1
config.transactionIsolation = "TRANSACTION_REPEATABLE_READ" //2
config.validate()
return HikariDataSource(config)
}
I see config.maximumPoolSize
often set to 3. I am not sure why it is specifically set to 3 but understand the idea (that is described in the Hikari Wiki page here).
On the other hand, what I really don't understand are commands config.isAutoCommit = false
(1) and config.transactionIsolation = "TRANSACTION_REPEATABLE_READ"
(2). Why are these two settings suggested when using Ktor with Exposed and not just sticking to default values?rcd27
03/23/2022, 1:27 PMalbrechtroehm
05/10/2022, 7:53 AMhawklike
05/17/2022, 4:15 PM