aryangupta1998 commented on code in PR #8003:
URL: https://github.com/apache/ozone/pull/8003#discussion_r2143708735


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/BlockDeletingService.java:
##########
@@ -94,12 +102,41 @@ public BlockDeletingService(
     dnConf = conf.getObject(DatanodeConfiguration.class);
     if (reconfigurationHandler != null) {
       reconfigurationHandler.register(dnConf);
+      registerReconfigCallbacks(reconfigurationHandler, (OzoneConfiguration) 
conf);
     }
     this.blockDeletingMaxLockHoldingTime =
         dnConf.getBlockDeletingMaxLockHoldingTime();
     metrics = BlockDeletingServiceMetrics.create();
   }
 
+  public void registerReconfigCallbacks(ReconfigurationHandler handler, 
OzoneConfiguration ozoneConf) {
+    handler.registerCompleteCallback((changedKeys, newConf) -> {
+      if (changedKeys.containsKey(OZONE_BLOCK_DELETING_SERVICE_INTERVAL) ||
+          changedKeys.containsKey(OZONE_BLOCK_DELETING_SERVICE_TIMEOUT) ||
+          changedKeys.containsKey(OZONE_BLOCK_DELETING_SERVICE_WORKERS)) {
+        updateAndRestart(ozoneConf);

Review Comment:
   IIUC, consider using the newConf object passed into the callback, containing 
the updated configuration values. This ensures that updateAndRestart() uses the 
latest values and avoids applying outdated configuration settings.
   `updateAndRestart(newConf);`



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java:
##########
@@ -110,7 +112,8 @@ public DirectoryDeletingService(long interval, TimeUnit 
unit,
 
   public void registerReconfigCallbacks(ReconfigurationHandler handler, 
OzoneConfiguration conf) {
     handler.registerCompleteCallback((changedKeys, newConf) -> {
-      if (changedKeys.containsKey(OZONE_DIR_DELETING_SERVICE_INTERVAL)) {
+      if (changedKeys.containsKey(OZONE_DIR_DELETING_SERVICE_INTERVAL) ||
+          changedKeys.containsKey(OZONE_THREAD_NUMBER_DIR_DELETION)) {
         updateAndRestart(conf);

Review Comment:
   Same here.



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