You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "xichen01 (via GitHub)" <gi...@apache.org> on 2023/05/30 10:40:34 UTC

[GitHub] [ozone] xichen01 opened a new pull request, #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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

   ## What changes were proposed in this pull request?
   Support deletion related parameter dynamic configuration
   OM:
   - ozone.key.deleting.limit.per.task
   
   SCM:
   - hdds.scm.block.deletion.per-interval.max
   
   Datanode:
   - hdds.datanode.block.deleting.limit.per.interval
   - hdds.datanode.block.delete.threads.max
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-8690
   
   ## How was this patch tested?
   
   unit test.
   


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


[GitHub] [ozone] xichen01 commented on a diff in pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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


##########
hadoop-hdds/config/src/main/java/org/apache/hadoop/hdds/conf/ConfigurationSource.java:
##########
@@ -183,6 +183,20 @@ default <T> T getObject(Class<T> configurationClass) {
 
   }
 
+  /**
+   * Returns a singleton instance of the given configuration class.
+   * If an instance of the class has already been created,
+   * it will be returned; otherwise, a new instance will be created,
+   * stored in a map for future retrieval.
+   *
+   * @param configurationClass The class for which a singleton
+   *                           instance is required
+   * @return a singleton instance of the given class
+   */
+  default <T> T getSingletonObject(Class<T> configurationClass) {
+    return getObject(configurationClass);
+  }
+

Review Comment:
   If we change the logic of `ConfigurationSource#getObject` directly, will this cause some of the tests to fail, since at the moment we can assume that each object from `ConfigurationSource#getObject` is independent and unaffected.
   If the `ConfigurationSource#getObject` is "Singleton" that maybe cause tests to affect with each other.
   
   Should we keep this implemented(`getSingletonObject`) temporarily, and implement a "Singleton" `ConfigurationSource#getObject` in another MR?



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


[GitHub] [ozone] xichen01 commented on pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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

   > Thanks @xichen01 for working on this. Mostly looks good, but I would prefer to implement this after #4774, #4794 (which both need some committer reviews), and a follow-up that connects the annotated configurations with the reconfiguration handler. The change will be much simpler then.
   
   OK, I will update this PR after https://github.com/apache/ozone/pull/4774 and https://github.com/apache/ozone/pull/4794 were merged


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


[GitHub] [ozone] xichen01 commented on a diff in pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -4704,6 +4707,14 @@ private String reconfOzoneReadOnlyAdmins(String newVal) {
     return String.valueOf(newVal);
   }
 
+  private String reconfOzoneKeyDeletingLimitPerTask(String newVal) {
+    getConfiguration().set(OZONE_KEY_DELETING_LIMIT_PER_TASK, newVal);

Review Comment:
   Done.



-- 
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-8690. Ozone Support deletion related parameter dynamic configuration [ozone]

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


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java:
##########
@@ -668,4 +679,24 @@ private void checkAdminPrivilege(String operation)
   public ReconfigurationHandler getReconfigurationHandler() {
     return reconfigurationHandler;
   }
+
+  private String reconfigBlockDeleteThreadMax(String value) {
+    getConf().set(HDDS_DATANODE_BLOCK_DELETE_THREAD_MAX, value);
+    conf.getObject(DatanodeConfiguration.class)
+        .setBlockDeleteThreads(Integer.parseInt(value));

Review Comment:
   Looks like this line is covered by L684 already.  It can be removed. 



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


[GitHub] [ozone] adoroszlai commented on a diff in pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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


##########
hadoop-hdds/config/src/main/java/org/apache/hadoop/hdds/conf/ConfigurationSource.java:
##########
@@ -183,6 +183,20 @@ default <T> T getObject(Class<T> configurationClass) {
 
   }
 
+  /**
+   * Returns a singleton instance of the given configuration class.
+   * If an instance of the class has already been created,
+   * it will be returned; otherwise, a new instance will be created,
+   * stored in a map for future retrieval.
+   *
+   * @param configurationClass The class for which a singleton
+   *                           instance is required
+   * @return a singleton instance of the given class
+   */
+  default <T> T getSingletonObject(Class<T> configurationClass) {
+    return getObject(configurationClass);
+  }
+

Review Comment:
   Thanks @xichen01 for making the change.  On second thought, instead of adding a new method `getSingletonObject`, we should override `getObject` from `ConfigurationSource` with the singleton-based implementation.  This way we can keep passing `ConfigurationSource`.
   
   In the long run, we should move towards passing the type-safe config objects (`DatanodeConfiguration`, `ScmConfig`, etc.)



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


[GitHub] [ozone] ChenSammi commented on a diff in pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeConfiguration.java:
##########
@@ -137,7 +146,7 @@ public class DatanodeConfiguration {
    * missed. With max threads 5, optimistically DN can handle 1500 individual
    * container delete tx in 60s with RocksDB cache miss.
    */
-  @Config(key = "block.delete.threads.max",
+  @Config(key = BLOCK_DELETE_THREAD_MAX,

Review Comment:
   @xichen01 , I find this property is registered to ReconfigurationHandler, but it doesn't have the "reconfigurable = true" field, while the property "block.deleting.limit.per.interval" below has the "reconfigurable = true" but not registered to ReconfigurationHandler. 
   Could you explain it a bit more that what's the required steps to make a property reconfigurable, and whether "reconfigurable = true" is an mandatory attribute for a reconfigurable property?



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


[GitHub] [ozone] ChenSammi commented on a diff in pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeConfiguration.java:
##########
@@ -137,7 +146,7 @@ public class DatanodeConfiguration {
    * missed. With max threads 5, optimistically DN can handle 1500 individual
    * container delete tx in 60s with RocksDB cache miss.
    */
-  @Config(key = "block.delete.threads.max",
+  @Config(key = BLOCK_DELETE_THREAD_MAX,

Review Comment:
   So either register the property explicitly with a consumer handler, or set the  "reconfigurable = true"  attribute to the property.  The later way the property will be auto registered with a default consumer handler, right? @xichen01 



-- 
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-8690. Ozone Support deletion related parameter dynamic configuration [ozone]

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

   > > > @xichen01 , can you check the failed test "TestOzoneManagerHAKeyDeletion.testKeyDeletion"? It might be related with the code change.
   > > 
   > > 
   > > The master branch have this Error too https://github.com/apache/ozone/actions/runs/6439086990/job/17486681800
   > 
   > Yes, it's reproduced with master branch. Created [HDDS-9414](https://issues.apache.org/jira/browse/HDDS-9414) to track the failure.
   
   @adoroszlai has create a ticket
   https://issues.apache.org/jira/projects/HDDS/issues/HDDS-9412


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


[GitHub] [ozone] ChenSammi commented on a diff in pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -4704,6 +4707,14 @@ private String reconfOzoneReadOnlyAdmins(String newVal) {
     return String.valueOf(newVal);
   }
 
+  private String reconfOzoneKeyDeletingLimitPerTask(String newVal) {
+    getConfiguration().set(OZONE_KEY_DELETING_LIMIT_PER_TASK, newVal);

Review Comment:
   Please add the check that newValue should be a positive value.



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


[GitHub] [ozone] adoroszlai commented on a diff in pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/conf/OzoneConfiguration.java:
##########
@@ -335,4 +336,16 @@ private static void addDeprecatedKeys() {
             OZONE_CONTAINER_COPY_WORKDIR)
     });
   }
+
+  @Override
+  public synchronized <T> T getSingletonObject(Class<T> configurationClass) {
+    if (singletons.containsKey(configurationClass)) {
+      return (T) singletons.get(configurationClass);
+    }
+
+    T singletonObject = getObject(configurationClass);
+    singletons.put(configurationClass, singletonObject);
+    return singletonObject;
+  }

Review Comment:
   This can be implemented more simply:
   
   ```suggestion
     public <T> T getSingletonObject(Class<T> configurationClass) {
       return (T) singletons.computeIfAbsent(configurationClass,
           c -> getObject(configurationClass));
     }
   ```



##########
hadoop-hdds/config/src/main/java/org/apache/hadoop/hdds/conf/ConfigurationSource.java:
##########
@@ -183,6 +183,20 @@ default <T> T getObject(Class<T> configurationClass) {
 
   }
 
+  /**
+   * Returns a singleton instance of the given configuration class.
+   * If an instance of the class has already been created,
+   * it will be returned; otherwise, a new instance will be created,
+   * stored in a map for future retrieval.
+   *
+   * @param configurationClass The class for which a singleton
+   *                           instance is required
+   * @return a singleton instance of the given class
+   */
+  default <T> T getSingletonObject(Class<T> configurationClass) {
+    return getObject(configurationClass);
+  }
+

Review Comment:
   I don't think this should be added to the `ConfigurationSource` interface, since it does not offer the "singleton" functionality.



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


[GitHub] [ozone] ChenSammi commented on a diff in pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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


##########
hadoop-hdds/docs/content/feature/Reconfigurability.md:
##########
@@ -38,13 +38,18 @@ The meaning of command options:
     - **status**:     Check reconfig status
     - **properties**: List reconfigurable properties
 
-## OM Reconfigurability
+## Retrieve the reconfigurable properties list
+To retrieve all the reconfigurable properties list for a specific component in Ozone,
+you can use the command: `ozone admin reconfig properties --address=<ip:port>`.

Review Comment:
   `ozone admin reconfig properties --address=<ip:port>` doesn't work.  The accepted format is what you used in the below examples. 
   
   



-- 
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-8690. Ozone Support deletion related parameter dynamic configuration [ozone]

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

   > @xichen01 , can you check the failed test "TestOzoneManagerHAKeyDeletion.testKeyDeletion"? It might be related with the code change.
   
   The master branch have this Error too https://github.com/apache/ozone/actions/runs/6439086990/job/17486681800


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


[GitHub] [ozone] ChenSammi commented on pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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

   @xichen01 , could you rebase this patch once you got 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


[GitHub] [ozone] xichen01 commented on a diff in pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/conf/OzoneConfiguration.java:
##########
@@ -335,4 +336,16 @@ private static void addDeprecatedKeys() {
             OZONE_CONTAINER_COPY_WORKDIR)
     });
   }
+
+  @Override
+  public synchronized <T> T getSingletonObject(Class<T> configurationClass) {
+    if (singletons.containsKey(configurationClass)) {
+      return (T) singletons.get(configurationClass);
+    }
+
+    T singletonObject = getObject(configurationClass);
+    singletons.put(configurationClass, singletonObject);
+    return singletonObject;
+  }

Review Comment:
   Done.



##########
hadoop-hdds/config/src/main/java/org/apache/hadoop/hdds/conf/ConfigurationSource.java:
##########
@@ -183,6 +183,20 @@ default <T> T getObject(Class<T> configurationClass) {
 
   }
 
+  /**
+   * Returns a singleton instance of the given configuration class.
+   * If an instance of the class has already been created,
+   * it will be returned; otherwise, a new instance will be created,
+   * stored in a map for future retrieval.
+   *
+   * @param configurationClass The class for which a singleton
+   *                           instance is required
+   * @return a singleton instance of the given class
+   */
+  default <T> T getSingletonObject(Class<T> configurationClass) {
+    return getObject(configurationClass);
+  }
+

Review Comment:
   `getSingletonObject` has been removed from `ConfigurationSource.java`



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


[GitHub] [ozone] xichen01 commented on a diff in pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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


##########
hadoop-hdds/docs/content/feature/Reconfigurability.md:
##########
@@ -38,13 +38,18 @@ The meaning of command options:
     - **status**:     Check reconfig status
     - **properties**: List reconfigurable properties
 
-## OM Reconfigurability
+## Retrieve the reconfigurable properties list
+To retrieve all the reconfigurable properties list for a specific component in Ozone,
+you can use the command: `ozone admin reconfig properties --address=<ip:port>`.

Review Comment:
   Already corrected



##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/conf/OzoneConfiguration.java:
##########
@@ -335,4 +334,5 @@ private static void addDeprecatedKeys() {
             OZONE_CONTAINER_COPY_WORKDIR)
     });
   }
+

Review Comment:
   Done.



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -4704,6 +4707,14 @@ private String reconfOzoneReadOnlyAdmins(String newVal) {
     return String.valueOf(newVal);
   }
 
+  private String reconfOzoneKeyDeletingLimitPerTask(String newVal) {
+    getConfiguration().set(OZONE_KEY_DELETING_LIMIT_PER_TASK, newVal);

Review Comment:
   I think may we can provide a `conf.getUnsignedInt()` for those configurations which must be larger than 0. we can do some check in `conf.getUnsignedInt()`



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


[GitHub] [ozone] adoroszlai commented on pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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

   > Should we maintain `Reconfigurable properties lists` to describe which keys can be configured, this may require effort to keep the documentation in sync with the code. Perhaps we could remove this section, and the user can get exactly this information via the command?
   
   Yes, let's remove the specific properties.  Documenting the way to explore the list of properties is enough.  An outdated doc may be worse than no doc.


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


[GitHub] [ozone] xichen01 commented on a diff in pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeStateMachine.java:
##########
@@ -260,7 +261,7 @@ public DatanodeStateMachine(DatanodeDetails datanodeDetails,
 
   @VisibleForTesting
   public DatanodeStateMachine(DatanodeDetails datanodeDetails,
-                              ConfigurationSource conf) throws IOException {
+                              OzoneConfiguration conf) throws IOException {

Review Comment:
   Done



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


[GitHub] [ozone] ChenSammi commented on a diff in pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeStateMachine.java:
##########
@@ -260,7 +261,7 @@ public DatanodeStateMachine(DatanodeDetails datanodeDetails,
 
   @VisibleForTesting
   public DatanodeStateMachine(DatanodeDetails datanodeDetails,
-                              ConfigurationSource conf) throws IOException {
+                              OzoneConfiguration conf) throws IOException {

Review Comment:
   @xichen01 , is this one missed? 



-- 
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-8690. Ozone Support deletion related parameter dynamic configuration [ozone]

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

   > > @xichen01 , can you check the failed test "TestOzoneManagerHAKeyDeletion.testKeyDeletion"? It might be related with the code change.
   > 
   > The master branch have this Error too https://github.com/apache/ozone/actions/runs/6439086990/job/17486681800
   
   Yes, it's reproduced with master branch.  Created HDDS-9414 to track the failure. 


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


[GitHub] [ozone] ChenSammi commented on a diff in pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeStateMachine.java:
##########
@@ -260,7 +261,7 @@ public DatanodeStateMachine(DatanodeDetails datanodeDetails,
 
   @VisibleForTesting
   public DatanodeStateMachine(DatanodeDetails datanodeDetails,
-                              ConfigurationSource conf) throws IOException {
+                              OzoneConfiguration conf) throws IOException {

Review Comment:
   Why we change the conf from ConfigurationSource to OzoneConfiguration? it's also changed in below OzoneContainer.java. 



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


[GitHub] [ozone] xichen01 commented on a diff in pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeConfiguration.java:
##########
@@ -137,7 +146,7 @@ public class DatanodeConfiguration {
    * missed. With max threads 5, optimistically DN can handle 1500 individual
    * container delete tx in 60s with RocksDB cache miss.
    */
-  @Config(key = "block.delete.threads.max",
+  @Config(key = BLOCK_DELETE_THREAD_MAX,

Review Comment:
   Yes, if you set the "reconfigurable = true" attribute, the configuration will be auto handled when "reconfigure".
   but one point needs to notice:
   
   The object registered to `ReconfigurationHandler` must be the same conf as the one that wants to get the value after reconfiguring.
   such as:
   ```java
   
         DatanodeConfiguration dnConf1 = conf.getObject(DatanodeConfiguration.class)
         DatanodeConfiguration dnConf2 = conf.getObject(DatanodeConfiguration.class)
   
         reconfigurationHandler =
             new ReconfigurationHandler("DN", conf, this::checkAdminPrivilege)
                 .register(dnConf1); 
   ```
   After reconfiguring, only `dnConf1 ` can get the changed value, because only `dnConf1` was registered to the `ReconfigurationHandler`



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


[GitHub] [ozone] adoroszlai commented on a diff in pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/reconfig/TestDatanodeReconfiguration.java:
##########
@@ -18,21 +18,94 @@
 package org.apache.hadoop.ozone.reconfig;
 
 import com.google.common.collect.ImmutableSet;
+import org.apache.hadoop.conf.ReconfigurationException;
 import org.apache.hadoop.hdds.conf.ReconfigurationHandler;
+import org.apache.hadoop.ozone.HddsDatanodeService;
+import org.apache.hadoop.ozone.container.common.statemachine.commandhandler.DeleteBlocksCommandHandler;
 import org.junit.jupiter.api.Test;
 
+import java.util.concurrent.ScheduledThreadPoolExecutor;
+import java.util.concurrent.ThreadPoolExecutor;
+
+import static org.apache.hadoop.ozone.OzoneConfigKeys.OZONE_BLOCK_DELETING_SERVICE_WORKERS;
+import static org.apache.hadoop.ozone.container.common.statemachine.DatanodeConfiguration.HDDS_DATANODE_BLOCK_DELETE_THREAD_MAX;
+import static org.apache.hadoop.ozone.container.common.statemachine.DatanodeConfiguration.HDDS_DATANODE_BLOCK_DELETING_LIMIT_PER_INTERVAL;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
 /**
  * Tests for Datanode reconfiguration.
  */
 class TestDatanodeReconfiguration extends ReconfigurationTestBase {
   @Override
   ReconfigurationHandler getSubject() {
-    return getCluster().getHddsDatanodes().get(0).getReconfigurationHandler();
+    return getFirstDatanode().getReconfigurationHandler();
   }
 
   @Test
   void reconfigurableProperties() {
-    assertProperties(getSubject(), ImmutableSet.of());
+    assertProperties(getSubject(), ImmutableSet.of(
+        HDDS_DATANODE_BLOCK_DELETING_LIMIT_PER_INTERVAL,
+        HDDS_DATANODE_BLOCK_DELETE_THREAD_MAX,
+        OZONE_BLOCK_DELETING_SERVICE_WORKERS));
+  }
+
+  @Test
+  public void blockDeletingLimitPerInterval() throws ReconfigurationException {
+    getFirstDatanode().getReconfigurationHandler().reconfigurePropertyImpl(
+        HDDS_DATANODE_BLOCK_DELETING_LIMIT_PER_INTERVAL, "1");
+
+    getFirstDatanode().getDatanodeStateMachine().getContainer()
+        .getBlockDeletingService().getBlockLimitPerInterval();
+
+    assertEquals(1, getFirstDatanode().getDatanodeStateMachine().getContainer()
+        .getBlockDeletingService().getBlockLimitPerInterval());
+  }
+
+  @Test
+  public void blockDeleteThreadMax() throws ReconfigurationException {
+    // Start the service and get the original pool size
+    ThreadPoolExecutor executor = ((DeleteBlocksCommandHandler)
+        getFirstDatanode().getDatanodeStateMachine().getCommandDispatcher()
+            .getDeleteBlocksCommandHandler()).getExecutor();
+    int originPoolSize = executor.getMaximumPoolSize();
+
+    // Attempt to increase the pool size by 1 and verify if it's successful
+    getFirstDatanode().getReconfigurationHandler().reconfigurePropertyImpl(
+        HDDS_DATANODE_BLOCK_DELETE_THREAD_MAX,
+        String.valueOf(originPoolSize + 1));
+    assertEquals(originPoolSize + 1, executor.getMaximumPoolSize());
+    assertEquals(originPoolSize + 1, executor.getCorePoolSize());
+
+    // Attempt to decrease the pool size by 1 and verify if it's successful
+    getFirstDatanode().getReconfigurationHandler().reconfigurePropertyImpl(
+        HDDS_DATANODE_BLOCK_DELETE_THREAD_MAX,
+        String.valueOf(originPoolSize - 1));
+    assertEquals(originPoolSize - 1, executor.getMaximumPoolSize());
+    assertEquals(originPoolSize - 1,  executor.getCorePoolSize());
+  }
+
+  @Test
+  public void blockDeletingServiceWorkers() throws ReconfigurationException {
+    ScheduledThreadPoolExecutor executor = (ScheduledThreadPoolExecutor)
+        getFirstDatanode().getDatanodeStateMachine().getContainer()
+            .getBlockDeletingService().getExecutorService();
+    int originPoolSize = executor.getCorePoolSize();
+
+    // Attempt to increase the pool size by 1 and verify if it's successful
+    getFirstDatanode().getReconfigurationHandler().reconfigurePropertyImpl(
+        OZONE_BLOCK_DELETING_SERVICE_WORKERS,
+        String.valueOf(originPoolSize + 1));
+    assertEquals(originPoolSize + 1, executor.getCorePoolSize());
+
+    // Attempt to decrease the pool size by 1 and verify if it's successful
+    getFirstDatanode().getReconfigurationHandler().reconfigurePropertyImpl(
+        OZONE_BLOCK_DELETING_SERVICE_WORKERS,
+        String.valueOf(originPoolSize - 1));
+    assertEquals(originPoolSize - 1, executor.getCorePoolSize());
+  }

Review Comment:
   We can avoid duplication by converting to `@ParameterizedTest`: https://github.com/adoroszlai/hadoop-ozone/commit/5aeb768560b36bf182dcc96bc50a0c71625f279d
   
   Also fixes findbugs error:
   
   ```
   M D RV: Return value of org.apache.hadoop.ozone.container.keyvalue.statemachine.background.BlockDeletingService.getBlockLimitPerInterval() ignored, but method has no side effect  At TestDatanodeReconfiguration.java:[line 58]
   ```
   
   https://github.com/xichen01/ozone/actions/runs/5577408467/jobs/10190274215#step:6:2367



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/reconfig/TestOmReconfiguration.java:
##########
@@ -26,6 +26,7 @@
 import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
 import static org.apache.hadoop.ozone.OzoneConfigKeys.OZONE_ADMINISTRATORS;
 import static org.apache.hadoop.ozone.OzoneConfigKeys.OZONE_READONLY_ADMINISTRATORS;
+import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_KEY_DELETING_LIMIT_PER_TASK;

Review Comment:
   `reconfigurableProperties()` test case needs to be updated: https://github.com/adoroszlai/hadoop-ozone/commit/9d9226e0afe713e70418874d26a156d2ea862688
   
   Fixes https://github.com/xichen01/ozone/actions/runs/5577408467/jobs/10190272872#step:5:4011



##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/statemachine/background/BlockDeletingService.java:
##########
@@ -669,4 +668,12 @@ public long getBytesReleased() {
       return bytesReleased;
     }
   }
+
+  public int getBlockLimitPerInterval() {
+    return dfsConf.getBlockDeletionLimit();
+  }
+
+  public DatanodeConfiguration getDfsConf() {
+    return dfsConf;

Review Comment:
   Nit: I think `dnConf` / `getDnConf` would be better.



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java:
##########
@@ -2125,6 +2128,14 @@ private String reconfOzoneReadOnlyAdmins(String newVal) {
     return String.valueOf(newVal);
   }
 
+  private String reconfHddsScmBlockDeletionPerIntervalMax(String newVal) {
+    getConfiguration().set(HDDS_SCM_BLOCK_DELETION_PER_INTERVAL_MAX, newVal);
+
+    getScmBlockManager().getSCMBlockDeletingService()
+        .setBlockDeleteTXNum(Integer.parseInt(newVal));
+    return newVal;
+  }

Review Comment:
   We simplify reconfiguration of this property by using `reconfigurable = true` and making sure the same instance of `scmConfig` is used in `SCMBlockDeletingService` as the one being reconfigured in SCM.
   
   Full change (also fixes `TestScmReconfiguration` failure):
   https://github.com/adoroszlai/hadoop-ozone/commit/1ce698fab5f9b6a55dab6e28f382bb29f6d65cc0



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


[GitHub] [ozone] xichen01 commented on pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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

   @adoroszlai Should we maintain `Reconfigurable properties lists` to describe which keys can be configured, this may require effort to keep the documentation in sync with the code. 
   Perhaps we could remove this section, and the user can get exactly this information via the command?
   https://github.com/apache/ozone/blob/9c6cd4b93e0427fc12bbedae8156c746cbe6cea1/hadoop-hdds/docs/content/feature/Reconfigurability.md?plain=1#L41-L48


-- 
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-8690. Ozone Support deletion related parameter dynamic configuration [ozone]

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


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeConfiguration.java:
##########
@@ -137,7 +146,7 @@ public class DatanodeConfiguration {
    * missed. With max threads 5, optimistically DN can handle 1500 individual
    * container delete tx in 60s with RocksDB cache miss.
    */
-  @Config(key = "block.delete.threads.max",
+  @Config(key = BLOCK_DELETE_THREAD_MAX,

Review Comment:
   @xichen01 , thanks for the explain. 



-- 
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-8690. Ozone Support deletion related parameter dynamic configuration [ozone]

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

   @xichen01 , could you rebase the patch to solve the conflicts again? 


-- 
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-8690. Ozone Support deletion related parameter dynamic configuration [ozone]

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


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


[GitHub] [ozone] xichen01 commented on a diff in pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeConfiguration.java:
##########
@@ -137,7 +146,7 @@ public class DatanodeConfiguration {
    * missed. With max threads 5, optimistically DN can handle 1500 individual
    * container delete tx in 60s with RocksDB cache miss.
    */
-  @Config(key = "block.delete.threads.max",
+  @Config(key = BLOCK_DELETE_THREAD_MAX,

Review Comment:
   If we change a configuration's value, if only need to change the value itself, and no additional operations are performed.  we can just add a `reconfigurable = true` in `@Config` annotation. the reconfigurable configuration can be auto registered. 
   ```java
         reconfigurationHandler =
             new ReconfigurationHandler("DN", conf, this::checkAdminPrivilege)
                 .register(HDDS_DATANODE_BLOCK_DELETE_THREAD_MAX,
                     this::reconfigBlockDeleteThreadMax)
                 .register(OZONE_BLOCK_DELETING_SERVICE_WORKERS,
                     this::reconfigDeletingServiceWorkers)
                 .register(conf.getObject(DatanodeConfiguration.class));  // register the reconfigurable configuration
   ```
   then this  configuration's value can be modify in runtime by `ozone admin reconfig` command.
   
   But If need to do something extra when modifying the configuration value, such as modifying the thread pool (`block.delete.threads.max`), we need to register the operation manually.



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


[GitHub] [ozone] adoroszlai commented on a diff in pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/conf/OzoneConfiguration.java:
##########
@@ -335,4 +336,16 @@ private static void addDeprecatedKeys() {
             OZONE_CONTAINER_COPY_WORKDIR)
     });
   }
+
+  @Override
+  public synchronized <T> T getSingletonObject(Class<T> configurationClass) {
+    if (singletons.containsKey(configurationClass)) {
+      return (T) singletons.get(configurationClass);
+    }
+
+    T singletonObject = getObject(configurationClass);
+    singletons.put(configurationClass, singletonObject);
+    return singletonObject;
+  }

Review Comment:
   It doesn't need to be `synchronized`, since it uses a `ConcurrentHashMap`'s atomic operation.



-- 
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-8690. Ozone Support deletion related parameter dynamic configuration [ozone]

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

   @xichen01 , can you check the failed test "TestOzoneManagerHAKeyDeletion.testKeyDeletion"? It might be related with the code change.  


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


[GitHub] [ozone] ChenSammi commented on a diff in pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/conf/OzoneConfiguration.java:
##########
@@ -335,4 +334,5 @@ private static void addDeprecatedKeys() {
             OZONE_CONTAINER_COPY_WORKDIR)
     });
   }
+

Review Comment:
   Can you revert the changes in this file since it's actually doesn't change any content? 



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


[GitHub] [ozone] ChenSammi commented on a diff in pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeConfiguration.java:
##########
@@ -137,7 +146,7 @@ public class DatanodeConfiguration {
    * missed. With max threads 5, optimistically DN can handle 1500 individual
    * container delete tx in 60s with RocksDB cache miss.
    */
-  @Config(key = "block.delete.threads.max",
+  @Config(key = BLOCK_DELETE_THREAD_MAX,

Review Comment:
   @xichen01 , I find this property is registered to ReconfigurationHandler, but it doesn't have the "reconfigurable = true" field, while the property "block.deleting.limit.per.interval" below has the "reconfigurable = true" but not registered to ReconfigurationHandler. 
   Could you explain it a bit more that what's the required steps to make a property reconfigurable? 



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


[GitHub] [ozone] ChenSammi commented on pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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

   @xichen01 , thanks for the improving the patch. There is one comment missed to address. And could you check the failed unit test?  I'm not sure if it's related or not with the code change of this patch. 


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


[GitHub] [ozone] ChenSammi commented on a diff in pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -4704,6 +4707,14 @@ private String reconfOzoneReadOnlyAdmins(String newVal) {
     return String.valueOf(newVal);
   }
 
+  private String reconfOzoneKeyDeletingLimitPerTask(String newVal) {
+    getConfiguration().set(OZONE_KEY_DELETING_LIMIT_PER_TASK, newVal);

Review Comment:
   You mean conf.setUnsignedInt?   It's a good idea. But the configuration class is in hadoop common module. 



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


[GitHub] [ozone] xichen01 commented on pull request #4798: HDDS-8690. Ozone Support deletion related parameter dynamic configuration

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

   > @xichen01 , thanks for the improving the patch. There is one comment missed to address. And could you rebase the patch since [HDDS-8869](https://issues.apache.org/jira/browse/HDDS-8869) is merged.
   
   Those useless modifies have been reverted.


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