You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "priyeshkaratha (via GitHub)" <gi...@apache.org> on 2026/10/23 17:56:36 UTC

[PR] HDDS-16640. Make KeyLifecycleService configuration reconfigurable at runtime [ozone]

priyeshkaratha opened a new pull request, #11721:
URL: https://github.com/apache/ozone/pull/11721

   ## What changes were proposed in this pull request?
   
   Before this change, changing any `ozone.om.key.lifecycle.service.*` property meant restarting OM. This PR makes those properties reconfigurable at runtime through the OM reconfiguration framework (`ozone admin reconfig --service=OM ... start`).
   
   **Reconfigurable properties** (the new `KeyLifecycleService.OZONE_KEY_LIFECYCLE_PROPERTIES` set):
   - `ozone.om.key.lifecycle.service.enabled`
   - `ozone.om.key.lifecycle.service.interval`
   - `ozone.om.key.lifecycle.service.timeout`
   - `ozone.om.key.lifecycle.service.workers`
   - `ozone.om.key.lifecycle.service.delete.batch-size`
   - `ozone.om.key.lifecycle.service.mpu.abort.limit.per.task`
   - `ozone.om.key.lifecycle.service.delete.cached.directory.max.count`
   - `ozone.om.key.lifecycle.service.state.save.interval.ms`
   - `ozone.om.key.lifecycle.service.state.save.keys.processed`
   - `ozone.om.key.lifecycle.service.move.to.trash.enabled`
   
   ## What is the link to the Apache JIRA
   
   HDDS-16640
   
   ## How was this patch tested?
   
   Added test case and tested manually
   
   ```
   bash-5.1$ vi /etc/hadoop/ozone-site.xml
   bash-5.1$ ozone admin reconfig --service=OM --address=om:9862 start
   OM: Started reconfiguration task on node [om:9862].
   bash-5.1$ ozone admin om lifecycle status --service-host om
   ========================================
             Lifecycle Service Status
   ========================================
   IsEnabled: true
   IsSuspended: false
   No buckets are currently being processed.
   ========================================
   bash-5.1$ vi /etc/hadoop/ozone-site.xml
   bash-5.1$
   bash-5.1$ ozone admin reconfig --service=OM --address=om:9862 start
   OM: Started reconfiguration task on node [om:9862].
   bash-5.1$ ozone admin om lifecycle status --service-host om
   ========================================
             Lifecycle Service Status
   ========================================
   IsEnabled: false
   No buckets are currently being processed.
   ========================================
   ```
   


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] HDDS-16640. Make KeyLifecycleService configuration reconfigurable at runtime [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #11721:
URL: https://github.com/apache/ozone/pull/11721#issuecomment-6410756212

   > could you add a section about reconfiguration in lifecycle.md and it's Chinese version?
   
   Please add documentation in [ozone-site](https://github.com/apache/ozone-site/).  Leftover docs are being removed from this repo in #10829.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] HDDS-16640. Make KeyLifecycleService configuration reconfigurable at runtime [ozone]

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on code in PR #11721:
URL: https://github.com/apache/ozone/pull/11721#discussion_r4374929317


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyLifecycleService.java:
##########
@@ -238,7 +262,90 @@ private boolean shouldRun() {
       // OzoneManager can be null for testing
       return true;
     }
-    return isServiceEnabled.get() && !suspended.get() && getOzoneManager().isLeaderReady();
+    return isServiceEnabled.get() && !suspended.get() && !restarting.get() && getOzoneManager().isLeaderReady();
+  }
+
+  /**
+   * Apply the new value of a property in {@link #OZONE_KEY_LIFECYCLE_PROPERTIES
+   * } without restarting OM.
+   * Changes to batch sizes and limits take effect on the next scheduled task. A new interval restarts the service,

Review Comment:
   "Changes to batch sizes and limits take effect on the next scheduled task" is not accurate, all the changes, except the interval, will take effect immediately on existing tasks' next batch scan. 



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] HDDS-16640. Make KeyLifecycleService configuration reconfigurable at runtime [ozone]

Posted by "priyeshkaratha (via GitHub)" <gi...@apache.org>.
priyeshkaratha merged PR #11721:
URL: https://github.com/apache/ozone/pull/11721


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] HDDS-16640. Make KeyLifecycleService configuration reconfigurable at runtime [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #11721:
URL: https://github.com/apache/ozone/pull/11721#issuecomment-6371861320

   Thanks for the patch.  To save CI resources, please consider creating PRs as draft, and keeping them that way until approved.  (No need to change this now, just a note for future PRs.)


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] HDDS-16640. Make KeyLifecycleService configuration reconfigurable at runtime [ozone]

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on PR #11721:
URL: https://github.com/apache/ozone/pull/11721#issuecomment-6410708557

   
   > 
   > Reconfigurable properties (the new KeyLifecycleService.OZONE_KEY_LIFECYCLE_PROPERTIES set):
   > 
   >     ozone.om.key.lifecycle.service.enabled
   >     ozone.om.key.lifecycle.service.interval
   >     ozone.om.key.lifecycle.service.timeout
   >     ozone.om.key.lifecycle.service.workers
   >     ozone.om.key.lifecycle.service.delete.batch-size
   >     ozone.om.key.lifecycle.service.mpu.abort.limit.per.task
   >     ozone.om.key.lifecycle.service.delete.cached.directory.max.count
   >     ozone.om.key.lifecycle.service.state.save.interval.ms
   >     ozone.om.key.lifecycle.service.state.save.keys.processed
   >     ozone.om.key.lifecycle.service.move.to.trash.enabled
   
   There property names in the description not match the real name 
   
   Will the "ozone admin reconfig --service=OM --address=om:9862 start" command display which property name is changed? 
   
   @priyeshkaratha , could you add a section about reconfiguration in lifecycle.md and it's Chinese version?


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] HDDS-16640. Make KeyLifecycleService configuration reconfigurable at runtime [ozone]

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on code in PR #11721:
URL: https://github.com/apache/ozone/pull/11721#discussion_r4374929317


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyLifecycleService.java:
##########
@@ -238,7 +262,90 @@ private boolean shouldRun() {
       // OzoneManager can be null for testing
       return true;
     }
-    return isServiceEnabled.get() && !suspended.get() && getOzoneManager().isLeaderReady();
+    return isServiceEnabled.get() && !suspended.get() && !restarting.get() && getOzoneManager().isLeaderReady();
+  }
+
+  /**
+   * Apply the new value of a property in {@link #OZONE_KEY_LIFECYCLE_PROPERTIES
+   * } without restarting OM.
+   * Changes to batch sizes and limits take effect on the next scheduled task. A new interval restarts the service,

Review Comment:
   "Changes to batch sizes and limits take effect on the next scheduled task" this not accurate, all the changes, except the interval, will take effect immediately on existing tasks' next batch scan. 



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] HDDS-16640. Make KeyLifecycleService configuration reconfigurable at runtime [ozone]

Posted by "priyeshkaratha (via GitHub)" <gi...@apache.org>.
priyeshkaratha commented on PR #11721:
URL: https://github.com/apache/ozone/pull/11721#issuecomment-6434329743

   Hi @ChenSammi Addressed review comments in latest commit. Created https://issues.apache.org/jira/browse/HDDS-17499 for document changes.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] HDDS-16640. Make KeyLifecycleService configuration reconfigurable at runtime [ozone]

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on code in PR #11721:
URL: https://github.com/apache/ozone/pull/11721#discussion_r4374959834


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/reconfig/TestOmReconfiguration.java:
##########
@@ -260,4 +267,36 @@ void sstFilteringServiceInterval() throws ReconfigurationException {
         "SstFilteringService should not be null when enabled");
   }
 
+  @Test
+  void keyLifecycleService() throws ReconfigurationException {
+    final OzoneManager om = cluster().getOzoneManager();
+    final KeyLifecycleService service = om.getKeyManager().getKeyLifecycleService();
+    final boolean originalEnabled = service.status().getIsEnabled();
+    final String originalInterval = om.getConfiguration().get(OZONE_KEY_LIFECYCLE_SERVICE_INTERVAL);
+    final String originalWorkers = om.getConfiguration().get(OZONE_KEY_LIFECYCLE_SERVICE_WORKERS);
+
+    getSubject().reconfigureProperty(OZONE_KEY_LIFECYCLE_SERVICE_ENABLED, String.valueOf(!originalEnabled));
+    assertEquals(!originalEnabled, service.status().getIsEnabled());
+    assertEquals(!originalEnabled, om.getLifecycleServiceStatus().getIsEnabled());
+
+    getSubject().reconfigureProperty(OZONE_KEY_LIFECYCLE_SERVICE_INTERVAL, "30s");
+    assertEquals(30000, service.getIntervalMillis());
+    assertEquals("30s", om.getConfiguration().get(OZONE_KEY_LIFECYCLE_SERVICE_INTERVAL));
+
+    getSubject().reconfigureProperty(OZONE_KEY_LIFECYCLE_SERVICE_WORKERS, "3");
+    assertEquals(3, service.getExecutorService().getCorePoolSize());
+
+    // Invalid values are rejected and the configuration is left unchanged
+    assertThrows(ReconfigurationException.class,
+        () -> getSubject().reconfigureProperty(OZONE_KEY_LIFECYCLE_SERVICE_DELETE_BATCH_SIZE, "0"));
+    assertThrows(ReconfigurationException.class,
+        () -> getSubject().reconfigureProperty(OZONE_KEY_LIFECYCLE_SERVICE_INTERVAL, "-1"));
+    assertEquals(30000, service.getIntervalMillis());
+
+    getSubject().reconfigureProperty(OZONE_KEY_LIFECYCLE_SERVICE_ENABLED, String.valueOf(originalEnabled));
+    getSubject().reconfigureProperty(OZONE_KEY_LIFECYCLE_SERVICE_INTERVAL, originalInterval);
+    getSubject().reconfigureProperty(OZONE_KEY_LIFECYCLE_SERVICE_WORKERS, originalWorkers);
+    assertEquals(originalEnabled, service.status().getIsEnabled());

Review Comment:
   Could you also add test for unset case? 



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] HDDS-16640. Make KeyLifecycleService configuration reconfigurable at runtime [ozone]

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on code in PR #11721:
URL: https://github.com/apache/ozone/pull/11721#discussion_r4374917808


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyLifecycleService.java:
##########
@@ -238,7 +262,90 @@ private boolean shouldRun() {
       // OzoneManager can be null for testing
       return true;
     }
-    return isServiceEnabled.get() && !suspended.get() && getOzoneManager().isLeaderReady();
+    return isServiceEnabled.get() && !suspended.get() && !restarting.get() && getOzoneManager().isLeaderReady();
+  }
+
+  /**
+   * Apply the new value of a property in {@link #OZONE_KEY_LIFECYCLE_PROPERTIES
+   * } without restarting OM.
+   * Changes to batch sizes and limits take effect on the next scheduled task. A new interval restarts the service,
+   * running tasks stop at their next checkpoint and resume from the saved scan state in the next run.
+   * @param property the property being reconfigured
+   * @param conf configuration holding the new value, or not holding the property to fall back to the default
+   */
+  public void reconfigure(String property, ConfigurationSource conf) {
+    switch (property) {
+    case OZONE_KEY_LIFECYCLE_SERVICE_ENABLED:
+      isServiceEnabled.set(conf.getBoolean(property, OZONE_KEY_LIFECYCLE_SERVICE_ENABLED_DEFAULT));

Review Comment:
   I believe we should call the start() if the change is from false to enabled, and do nothing if it's from true-> false.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] HDDS-16640. Make KeyLifecycleService configuration reconfigurable at runtime [ozone]

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on code in PR #11721:
URL: https://github.com/apache/ozone/pull/11721#discussion_r4374945648


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyLifecycleService.java:
##########
@@ -238,7 +262,90 @@ private boolean shouldRun() {
       // OzoneManager can be null for testing
       return true;
     }
-    return isServiceEnabled.get() && !suspended.get() && getOzoneManager().isLeaderReady();
+    return isServiceEnabled.get() && !suspended.get() && !restarting.get() && getOzoneManager().isLeaderReady();
+  }
+
+  /**
+   * Apply the new value of a property in {@link #OZONE_KEY_LIFECYCLE_PROPERTIES
+   * } without restarting OM.
+   * Changes to batch sizes and limits take effect on the next scheduled task. A new interval restarts the service,
+   * running tasks stop at their next checkpoint and resume from the saved scan state in the next run.
+   * @param property the property being reconfigured
+   * @param conf configuration holding the new value, or not holding the property to fall back to the default
+   */
+  public void reconfigure(String property, ConfigurationSource conf) {

Review Comment:
   Instead of for each property change to take effect individually, is it possible that we can handle all the property change in one function in the same time? 



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] HDDS-16640. Make KeyLifecycleService configuration reconfigurable at runtime [ozone]

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on PR #11721:
URL: https://github.com/apache/ozone/pull/11721#issuecomment-6459578418

   Thanks @priyeshkaratha  for updating the patch. 
   
   One minor comment is we'd better change the log message from "KeyLifecycleService is suspended, disabled, or leader not ready" to ""KeyLifecycleService is suspended, disabled, leader not ready, or about to restart". 
   
   And the introduced "OZONE_KEY_LIFECYCLE_PROPERTIES" reminds me that maybe we should extract all the key lifecycle properties from OMConfigKeys, to a new file, similar to "OmConfig", and extend the ReconfigurableConfig. What do you think? 


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] HDDS-16640. Make KeyLifecycleService configuration reconfigurable at runtime [ozone]

Posted by "priyeshkaratha (via GitHub)" <gi...@apache.org>.
priyeshkaratha commented on PR #11721:
URL: https://github.com/apache/ozone/pull/11721#issuecomment-6489851118

   Thanks @ChenSammi for the review


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] HDDS-16640. Make KeyLifecycleService configuration reconfigurable at runtime [ozone]

Posted by "priyeshkaratha (via GitHub)" <gi...@apache.org>.
priyeshkaratha commented on code in PR #11721:
URL: https://github.com/apache/ozone/pull/11721#discussion_r4385295284


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/reconfig/TestOmReconfiguration.java:
##########
@@ -260,4 +267,36 @@ void sstFilteringServiceInterval() throws ReconfigurationException {
         "SstFilteringService should not be null when enabled");
   }
 
+  @Test
+  void keyLifecycleService() throws ReconfigurationException {
+    final OzoneManager om = cluster().getOzoneManager();
+    final KeyLifecycleService service = om.getKeyManager().getKeyLifecycleService();
+    final boolean originalEnabled = service.status().getIsEnabled();
+    final String originalInterval = om.getConfiguration().get(OZONE_KEY_LIFECYCLE_SERVICE_INTERVAL);
+    final String originalWorkers = om.getConfiguration().get(OZONE_KEY_LIFECYCLE_SERVICE_WORKERS);
+
+    getSubject().reconfigureProperty(OZONE_KEY_LIFECYCLE_SERVICE_ENABLED, String.valueOf(!originalEnabled));
+    assertEquals(!originalEnabled, service.status().getIsEnabled());
+    assertEquals(!originalEnabled, om.getLifecycleServiceStatus().getIsEnabled());
+
+    getSubject().reconfigureProperty(OZONE_KEY_LIFECYCLE_SERVICE_INTERVAL, "30s");
+    assertEquals(30000, service.getIntervalMillis());
+    assertEquals("30s", om.getConfiguration().get(OZONE_KEY_LIFECYCLE_SERVICE_INTERVAL));
+
+    getSubject().reconfigureProperty(OZONE_KEY_LIFECYCLE_SERVICE_WORKERS, "3");
+    assertEquals(3, service.getExecutorService().getCorePoolSize());
+
+    // Invalid values are rejected and the configuration is left unchanged
+    assertThrows(ReconfigurationException.class,
+        () -> getSubject().reconfigureProperty(OZONE_KEY_LIFECYCLE_SERVICE_DELETE_BATCH_SIZE, "0"));
+    assertThrows(ReconfigurationException.class,
+        () -> getSubject().reconfigureProperty(OZONE_KEY_LIFECYCLE_SERVICE_INTERVAL, "-1"));
+    assertEquals(30000, service.getIntervalMillis());
+
+    getSubject().reconfigureProperty(OZONE_KEY_LIFECYCLE_SERVICE_ENABLED, String.valueOf(originalEnabled));
+    getSubject().reconfigureProperty(OZONE_KEY_LIFECYCLE_SERVICE_INTERVAL, originalInterval);
+    getSubject().reconfigureProperty(OZONE_KEY_LIFECYCLE_SERVICE_WORKERS, originalWorkers);
+    assertEquals(originalEnabled, service.status().getIsEnabled());

Review Comment:
   Added



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] HDDS-16640. Make KeyLifecycleService configuration reconfigurable at runtime [ozone]

Posted by "priyeshkaratha (via GitHub)" <gi...@apache.org>.
priyeshkaratha commented on code in PR #11721:
URL: https://github.com/apache/ozone/pull/11721#discussion_r4385293495


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyLifecycleService.java:
##########
@@ -238,7 +262,90 @@ private boolean shouldRun() {
       // OzoneManager can be null for testing
       return true;
     }
-    return isServiceEnabled.get() && !suspended.get() && getOzoneManager().isLeaderReady();
+    return isServiceEnabled.get() && !suspended.get() && !restarting.get() && getOzoneManager().isLeaderReady();
+  }
+
+  /**
+   * Apply the new value of a property in {@link #OZONE_KEY_LIFECYCLE_PROPERTIES
+   * } without restarting OM.
+   * Changes to batch sizes and limits take effect on the next scheduled task. A new interval restarts the service,
+   * running tasks stop at their next checkpoint and resume from the saved scan state in the next run.
+   * @param property the property being reconfigured
+   * @param conf configuration holding the new value, or not holding the property to fall back to the default
+   */
+  public void reconfigure(String property, ConfigurationSource conf) {

Review Comment:
   Yes, it is handled



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] HDDS-16640. Make KeyLifecycleService configuration reconfigurable at runtime [ozone]

Posted by "priyeshkaratha (via GitHub)" <gi...@apache.org>.
priyeshkaratha commented on PR #11721:
URL: https://github.com/apache/ozone/pull/11721#issuecomment-6460535033

   > And the introduced "OZONE_KEY_LIFECYCLE_PROPERTIES" reminds me that maybe we should extract all the key lifecycle properties from OMConfigKeys, to a new file, similar to "OmConfig", and extend the ReconfigurableConfig, that will make the logic very clear, and also easy to maintain. What do you think?
   
   Thanks @ChenSammi. It makes sense to me too. It may require more changes. I have created followup Jira [HDDS-17515](https://issues.apache.org/jira/browse/HDDS-17515) for the same
    


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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