siddhantsangwan commented on code in PR #8490:
URL: https://github.com/apache/ozone/pull/8490#discussion_r2113464686


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancer.java:
##########
@@ -459,6 +461,21 @@ private void 
validateConfiguration(ContainerBalancerConfiguration conf)
           "hdds.container.balancer.move.replication.timeout should " +
           "be less than hdds.container.balancer.move.timeout.");
     }
+
+    // (move.timeout - move.replication.timeout - 
event.timeout.datanode.offset) should be greater than 9 minutes

Review Comment:
   Should be "greater than equal to"



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancer.java:
##########
@@ -459,6 +461,21 @@ private void 
validateConfiguration(ContainerBalancerConfiguration conf)
           "hdds.container.balancer.move.replication.timeout should " +
           "be less than hdds.container.balancer.move.timeout.");
     }
+
+    // (move.timeout - move.replication.timeout - 
event.timeout.datanode.offset) should be greater than 9 minutes
+    long datanodeOffset = 
ozoneConfiguration.getTimeDuration("hdds.scm.replication.event.timeout.datanode.offset",
+        Duration.ofMinutes(6).toMillis(), TimeUnit.MILLISECONDS);
+    if ((conf.getMoveTimeout().toMillis() - 
conf.getMoveReplicationTimeout().toMillis() - datanodeOffset)
+        < Duration.ofMinutes(9).toMillis()) {
+      String msg = String.format("(hdds.container.balancer.move.timeout (%sm) 
- " +
+              "hdds.container.balancer.move.replication.timeout (%sm) - " +
+              "hdds.scm.replication.event.timeout.datanode.offset (%sm)) 
should be greater than 9 minutes.",

Review Comment:
   Should be "greater than equal to"



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