You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The concern between exporting the metrics and timestamping/measuring a timing should be separated indeed, since the later is used on the PooledRef for stuff like eviction, as you found out.
This is a bit last minute, but I think it is worth the effort to split that concern and have a Clock option on the PoolBuilder for that purpose, along with removing the now() and measureTime methods on PoolMetricsRecorder.
This commit removes the responsibility of timestamping from the
PoolMetricsRecorder and puts it on a Clock instance that can be passed
to the PoolBuilder.
`now()` and `measureTime(long)` have been removed from the former, and
pool implementations now use the configured Clock instead. The default
clock is `Clock.SystemUTC()` (since only the millis() method is used).
Expected behavior
Idle time should not depend on metrics recorder
Actual behavior
The current implementation uses metrics recorder to calculate the idle time
When there is no metrics recorder
reactor.pool.NoOpPoolMetricsRecorder
is usedwhere
now()
andmeasureTime(long startTimeMillis)
always return 0This change works for me
Steps to reproduce
Reactor Pool version
current snapshot version
JVM version (e.g.
java -version
)OS version (e.g.
uname -a
)The text was updated successfully, but these errors were encountered: