You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2022/05/18 20:48:55 UTC

[GitHub] [geode] dschneider-pivotal commented on a diff in pull request #7705: GEODE-10319: Clear meters when closing the meter registry

dschneider-pivotal commented on code in PR #7705:
URL: https://github.com/apache/geode/pull/7705#discussion_r876365140


##########
geode-core/src/main/java/org/apache/geode/metrics/internal/InternalDistributedSystemMetricsService.java:
##########
@@ -227,6 +227,7 @@ private void clearAndCloseMeterRegistry() {
       new HashSet<>(meterRegistry.getRegistries())
           .forEach(meterRegistry::remove);
 
+      meterRegistry.clear();

Review Comment:
   If you call clear first, then when close is called it will not be able to ask each thing in the registry to close. If calling close on each meter is important then you should call clear AFTER you call close,



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org