sodonnel commented on code in PR #4069:
URL: https://github.com/apache/ozone/pull/4069#discussion_r1046146389
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ReplicationManager.java:
##########
@@ -765,6 +767,34 @@ public void setEventTimeout(Duration timeout) {
this.eventTimeout = timeout.toMillis();
}
+ /**
+ * Deadline which should be set on commands sent from ReplicationManager
+ * to the datanodes, as a percentage of the event.timeout. If the command
+ * has not been processed on the datanode by this time, it will be dropped
+ * by the datanode and Replication Manager will need to resend it.
+ */
+ @Config(key = "command.deadline.factor",
+ type = ConfigType.DOUBLE,
+ defaultValue = "0.9",
+ tags = {SCM, OZONE},
+ description = "Fraction of the hdds.scm.replication.event.timeout "
+ + "from the current time which should be set as a deadline for "
+ + "commands sent from ReplicationManager to datanodes. "
+ + "Commands which are not processed before this deadline will be "
+ + "dropped by the datanodes. Should be a value > 0 and <= 1.")
+ private double commandDeadlineFactor = 0.9;
+ public double getCommandDeadlineFactor() {
+ return commandDeadlineFactor;
+ }
+
+ public void setCommandDeadlineFactor(double val) {
+ if (!(val > 0) || (val > 1)) {
+ throw new IllegalArgumentException(val
+ + " must be greater than 0 and less than equal to 1");
+ }
Review Comment:
Ah, I had a feeling there should be something like this. I will add this in.
--
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]