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
When working with various ConnectionProvider/MetricRegistrar arrangements, I am able to verify deRegistration of Metrics when I dispose the provider, but only if I do not set anything for disposeTimeout. Once I add that, it loses the ability to deregister its Metrics.
Expected Behavior
ConnectionProvider Metrics should be deRegistered on dispose, regardless of disposeTimeout use.
Actual Behavior
When adding disposeTimeout to a ConnectionProvider, Metrics are no longer deRegistered when the ConnectionProvider is disposed
Perhaps GracefulShutdownInstrumentedPool is supposed to perform the deRegistration on its own happy path, but I see nothing like that in its implementation. Without knowing how it was intended to work, not sure else I can glean...
Your Environment
Reactor version(s) used: encountered in 1.1.18; reproduction was just done against main
JVM version: 21
OS and version: Windows 11
The text was updated successfully, but these errors were encountered:
When working with various ConnectionProvider/MetricRegistrar arrangements, I am able to verify deRegistration of Metrics when I dispose the provider, but only if I do not set anything for
disposeTimeout
. Once I add that, it loses the ability to deregister its Metrics.Expected Behavior
ConnectionProvider
Metrics should be deRegistered on dispose, regardless ofdisposeTimeout
use.Actual Behavior
When adding
disposeTimeout
to aConnectionProvider
, Metrics are no longer deRegistered when theConnectionProvider
is disposedSteps to Reproduce
Can reproduce this problem with a tweak to an existing
reactor-netty-core
test:Add to
ConnectionProvider
setup inPooledConnectionProviderDefaultMetricsTest.testConnectionPoolPendingAcquireSize
:Possible Solution
In
PooledConnectionProvider
, I see that Metric cleanup is only performed inonErrorResume
for theGracefulShutdownInstrumentedPool
block:reactor-netty/reactor-netty-core/src/main/java/reactor/netty/resources/PooledConnectionProvider.java
Lines 201 to 208 in dd0c42d
whereas in the de facto
else
it is done unconditionally:reactor-netty/reactor-netty-core/src/main/java/reactor/netty/resources/PooledConnectionProvider.java
Lines 220 to 223 in dd0c42d
Perhaps GracefulShutdownInstrumentedPool is supposed to perform the deRegistration on its own happy path, but I see nothing like that in its implementation. Without knowing how it was intended to work, not sure else I can glean...
Your Environment
1.1.18
; reproduction was just done againstmain
21
Windows 11
The text was updated successfully, but these errors were encountered: