peterxcli commented on code in PR #9173:
URL: https://github.com/apache/ozone/pull/9173#discussion_r2453956910
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/QuotaRepairTask.java:
##########
@@ -102,32 +102,33 @@ 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));
OzoneManagerProtocolProtos.QuotaRepairRequest.Builder builder
= OzoneManagerProtocolProtos.QuotaRepairRequest.newBuilder();
// repair active db
- activeMetaManager = createActiveDBCheckpoint(om.getMetadataManager(),
om.getConfiguration());
- repairActiveDb(activeMetaManager, builder, buckets);
+ try (OMMetadataManager activeMetaManager =
+ createActiveDBCheckpoint(om.getMetadataManager(),
om.getConfiguration())) {
+ repairActiveDb(activeMetaManager, builder, buckets);
// TODO: repair snapshots for quota
Review Comment:
this line should have indent, too.
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/ReconTaskControllerImpl.java:
##########
@@ -741,16 +740,16 @@ private void
processReInitializationEvent(ReconTaskReInitializationEvent event)
resetRetryCounters();
LOG.info("Completed async task reinitialization");
}
+
+ // Clean up checkpoint files after use (database connections are
automatically closed by try-with-resources)
+ cleanupCheckpointFiles(checkpointedOMMetadataManager);
Review Comment:
Could you elaborate why we need this new function? and should we remove the
old one?
--
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]