dropwizard/metrics

InstrumentedExecutorService does not remove registered gauges after shutdown

nicu-da opened this issue · 3 comments

Similar to #1684.

As the gauges are not removed, once we shutdown the executor service and try to start again with the same name, the executor service can no longer be started.

Do you have this issue only in tests or also in production?

If the latter, could you please describe the use case?

The issue would also happen in production.
The use-case is caused by having multiple components started within the same java process. As part of specific failure handlers a component can be restarted. As the component itself manages the executor services it uses, this also entails stopping the current execution services and starting them again, using the same name. This in turn is impossible to do because the gauges added as part of #1928 are never removed when the executor service is stopped.

This issue is stale because it has been open 180 days with no activity. Remove the "stale" label or comment or this will be closed in 14 days.