Copilot commented on code in PR #11054:
URL: https://github.com/apache/ozone/pull/11054#discussion_r3807982693
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ReplicationManager.java:
##########
@@ -1425,6 +1582,21 @@ public void validate() {
"inflight.limit.factor is set to " + inflightReplicationLimitFactor
+ " and must be <= 1");
}
+ if (ecDecommissionReconstructionLoadFactor < 0) {
+ throw new IllegalArgumentException(
+ "decommission.ec.reconstruction.load.factor is set to "
+ + ecDecommissionReconstructionLoadFactor + " and must be >=
0");
+ }
Review Comment:
Config validation for ecDecommissionReconstructionLoadFactor only checks < 0
and > 1. Since the config framework parses DOUBLE via Double.parseDouble (which
accepts "NaN"), a NaN value will bypass both comparisons and be accepted.
Consider rejecting non-finite values (NaN / Infinity) explicitly (same applies
to inflightReplicationLimitFactor in this method).
--
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]