Closed bezmax closed 2 years ago
Care to submit a pull request to fix the problem?
Sure, will do!
Just a friendly ping, could someone merge this PR?
The fact is that this is a major bug at the moment, as the pool behaves poorly when maxLifeTime
is not explicitly set.
Current workaround: set spring.r2dbc.pool.max-life-time
to -1.
Bug Report
The default for maxLifeTime is defined as
NO_TIMEOUT = Duration.ofNanos(-1)
, which is supposed to mean "No timeout". However, the current implementation of actual evectionPredicate, attempts to dotoMillis
conversion, which results in0
, thus resulting in theif (maxIdleTimeMills == 0 || maxLifeTimeMillis == 0)
always returningtrue
.Possible Solution
Replace
maxLifeTimeMillis == 0
withmaxLifeTime.isZero()
.