This is an automated email from the ASF dual-hosted git repository.

sumitagrawal pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new d4617d0f12 HDDS-13428. Recon - Retrigger of build whole NSSummary tree 
task submission inconsistency. (#8793)
d4617d0f12 is described below

commit d4617d0f1289f5e23f3bdf0e8dd2153541bc25c6
Author: Devesh Kumar Singh <[email protected]>
AuthorDate: Mon Jul 14 22:05:49 2025 +0530

    HDDS-13428. Recon - Retrigger of build whole NSSummary tree task submission 
inconsistency. (#8793)
---
 .../org/apache/hadoop/ozone/recon/ReconUtils.java     | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git 
a/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/ReconUtils.java
 
b/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/ReconUtils.java
index 10014ae741..190b61b8fa 100644
--- 
a/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/ReconUtils.java
+++ 
b/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/ReconUtils.java
@@ -100,6 +100,13 @@ public class ReconUtils {
       ReconUtils.class);
 
   private static AtomicBoolean rebuildTriggered = new AtomicBoolean(false);
+  private static final ExecutorService NSSUMMARY_REBUILD_EXECUTOR =
+      Executors.newSingleThreadExecutor(r -> {
+        Thread t = new Thread(r);
+        t.setName("RebuildNSSummaryThread");
+        t.setDaemon(true); // Optional: allows JVM to exit without waiting
+        return t;
+      });
 
   public ReconUtils() {
   }
@@ -395,23 +402,17 @@ public static String 
convertToObjectPathForOpenKeySearch(String prevKeyPrefix,
 
   private static void triggerRebuild(ReconNamespaceSummaryManager 
reconNamespaceSummaryManager,
                                      ReconOMMetadataManager omMetadataManager) 
{
-    ExecutorService executor = Executors.newSingleThreadExecutor(r -> {
-      Thread t = new Thread(r);
-      t.setName("RebuildNSSummaryThread");
-      return t;
-    });
-
-    executor.submit(() -> {
+    NSSUMMARY_REBUILD_EXECUTOR.submit(() -> {
       long startTime = Time.monotonicNow();
       log.info("Rebuilding NSSummary tree...");
       try {
         reconNamespaceSummaryManager.rebuildNSSummaryTree(omMetadataManager);
-      } finally {
         long endTime = Time.monotonicNow();
         log.info("NSSummary tree rebuild completed in {} ms.", endTime - 
startTime);
+      } catch (Throwable t) {
+        log.error("NSSummary tree rebuild failed.", t);
       }
     });
-    executor.shutdown();
   }
 
   /**


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to