You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2019/12/03 19:05:47 UTC

[GitHub] [hadoop-ozone] xiaoyuyao commented on a change in pull request #286: HDDS-2475. Unregister ContainerMetadataScrubberMetrics on thread exit

xiaoyuyao commented on a change in pull request #286: HDDS-2475. Unregister ContainerMetadataScrubberMetrics on thread exit
URL: https://github.com/apache/hadoop-ozone/pull/286#discussion_r353366254
 
 

 ##########
 File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/ContainerMetadataScanner.java
 ##########
 @@ -58,11 +58,17 @@ public void run() {
      * the outer daemon loop exits on shutdown()
      */
     LOG.info("Background ContainerMetadataScanner starting up");
-    while (!stopping) {
-      runIteration();
-      if(!stopping) {
-        metrics.resetNumUnhealthyContainers();
-        metrics.resetNumContainersScanned();
+    try {
+      while (!stopping) {
+        runIteration();
+        if (!stopping) {
+          metrics.resetNumUnhealthyContainers();
+          metrics.resetNumContainersScanned();
+        }
+      }
 
 Review comment:
   Can we add a log entry if any chance the runIteration() throw? Similar logic can be found in ContainerDataScanner#run().

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org