peterxcli commented on code in PR #9173:
URL: https://github.com/apache/ozone/pull/9173#discussion_r2546308399


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/ReconTaskControllerImpl.java:
##########
@@ -749,8 +758,10 @@ private void 
processReInitializationEvent(ReconTaskReInitializationEvent event)
     } catch (Exception e) {
       LOG.error("Error processing reinitialization event", e);
     } finally {
-      // Clean up the checkpointed metadata manager and its files after use
-      cleanupCheckpoint(checkpointedOMMetadataManager);
+      // Clean up checkpoint files after use (database connections are 
automatically closed by try-with-resources)

Review Comment:
   ```suggestion
   ```



##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/ReconTaskControllerImpl.java:
##########
@@ -749,8 +758,10 @@ private void 
processReInitializationEvent(ReconTaskReInitializationEvent event)
     } catch (Exception e) {
       LOG.error("Error processing reinitialization event", e);
     } finally {
-      // Clean up the checkpointed metadata manager and its files after use
-      cleanupCheckpoint(checkpointedOMMetadataManager);
+      // Clean up checkpoint files after use (database connections are 
automatically closed by try-with-resources)

Review Comment:
   this comment is a little redundant 



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/QuotaRepairTask.java:
##########
@@ -102,14 +102,13 @@ public static String getStatus() {
 
   private boolean repairTask(List<String> buckets) {
     LOG.info("Starting quota repair task {}", REPAIR_STATUS);
-    OMMetadataManager activeMetaManager = null;
-    try {
-      // thread pool with 3 Table type * (1 task each + 3 thread for each task)
-      executor = Executors.newFixedThreadPool(3 * (1 + TASK_THREAD_CNT));
+    // thread pool with 3 Table type * (1 task each + 3 thread for each task)
+    executor = Executors.newFixedThreadPool(3 * (1 + TASK_THREAD_CNT));
+    try (OMMetadataManager activeMetaManager =

Review Comment:
   ```suggestion
       try (OMMetadataManager activeMetaManager =
         executor = Executors.newFixedThreadPool(3 * (1 + TASK_THREAD_CNT));
   ```



-- 
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]


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

Reply via email to