Copilot commented on code in PR #9362:
URL: https://github.com/apache/ozone/pull/9362#discussion_r2594451005


##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -1035,6 +1035,22 @@
       balances the amount of metadata.
     </description>
   </property>
+  <property>
+    <name>ozone.scm.container.space.requirement.multiplier</name>
+    <value>5.0</value>
+    <tag>OZONE, SCM, MANAGEMENT</tag>
+    <description>
+      Multiplier for container space requirement when checking if a datanode
+      has enough space for container allocation. The required space is 
calculated
+      as container size multiplied by this value. This prevents concurrent 
clients
+      from all passing the space check when there's only enough space for one
+      container. For example, with default container size of 5GB and multiplier
+      of 5.0, the system will require 25GB of available space before allocating
+      a new container. This ensures that if only 6GB is remaining, the check 
will
+      fail, preventing multiple clients from attempting to create containers
+      concurrently when there's only space for one.
+    </description>

Review Comment:
   The example in the documentation is incorrect. With a default container size 
of 5GB and a multiplier of 5.0, the required space would be 25GB (5GB * 5.0), 
not 10GB as mentioned in the PR description. The documentation correctly states 
25GB, but this contradicts the PR description which mentions increasing from 
5GB to 10GB (which would require a multiplier of 2.0).



##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/ScmConfigKeys.java:
##########
@@ -359,6 +359,10 @@ public final class ScmConfigKeys {
       "ozone.scm.container.size";
   public static final String OZONE_SCM_CONTAINER_SIZE_DEFAULT = "5GB";
 
+  public static final String OZONE_SCM_CONTAINER_SPACE_REQUIREMENT_MULTIPLIER =
+      "ozone.scm.container.space.requirement.multiplier";
+  public static final double 
OZONE_SCM_CONTAINER_SPACE_REQUIREMENT_MULTIPLIER_DEFAULT = 5.0;

Review Comment:
   The PR description states the default multiplier is 2.0, but the 
implementation sets it to 5.0. This inconsistency should be resolved. Either 
update the PR description to reflect the actual default of 5.0, or change the 
default value in the code to 2.0 to match the description.
   ```suggestion
     public static final double 
OZONE_SCM_CONTAINER_SPACE_REQUIREMENT_MULTIPLIER_DEFAULT = 2.0;
   ```



##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -1035,6 +1035,22 @@
       balances the amount of metadata.
     </description>
   </property>
+  <property>
+    <name>ozone.scm.container.space.requirement.multiplier</name>
+    <value>5.0</value>

Review Comment:
   The PR description states the default multiplier is 2.0, but the 
implementation sets it to 5.0. This inconsistency should be resolved. Either 
update the PR description to reflect the actual default of 5.0, or change the 
default value in the code to 2.0 to match the description.



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