aaronlindsey commented on a change in pull request #6665:
URL: https://github.com/apache/geode/pull/6665#discussion_r662638595



##########
File path: 
geode-core/src/main/java/org/apache/geode/management/internal/util/ManagementUtils.java
##########
@@ -162,14 +163,20 @@ public static DistributedMember 
getDistributedMemberByNameOrId(String memberName
     Set<Region<?, ?>> rootRegions = cache.rootRegions();
 
     for (Region<?, ?> rootRegion : rootRegions) {
-      regionNames.add(rootRegion.getFullPath().substring(1));
+      try {
+        Set<Region<?, ?>> subRegions = rootRegion.subregions(true);
 
-      Set<Region<?, ?>> subRegions = rootRegion.subregions(true);
+        for (Region<?, ?> subRegion : subRegions) {
+          regionNames.add(subRegion.getFullPath().substring(1));
+        }
 
-      for (Region<?, ?> subRegion : subRegions) {
-        regionNames.add(subRegion.getFullPath().substring(1));
+      } catch (RegionDestroyedException ignored) {

Review comment:
       We are performing a health check using the REST API /members endpoint 
while some regions are being created and destroyed and RegionDestroyedException 
gets logged quite often. We would like to suppress this exception because it's 
expected for the call to subregions() to throw this exception after a region is 
destroyed and it's confusing to users to see this exception in the logs. I am 
hesitant to log it as an info level exception because it will still show up in 
the logs under normal circumstances and will still be confusing to users.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to