chihsuan opened a new pull request, #10373: URL: https://github.com/apache/ozone/pull/10373
## What changes were proposed in this pull request? `hdds.datanode.replication.outofservice.limit.factor` gives more weight to maintenance and decommission replication tasks over normal replication tasks. The valid range is `[1, 10]` (`OUTOFSERVICE_FACTOR_MIN`..`OUTOFSERVICE_FACTOR_MAX`). Previously, any out-of-range value was reset to `OUTOFSERVICE_FACTOR_DEFAULT` (2). This was unexpected: configuring a value above the maximum (e.g. 20, intending *more* weight) silently dropped the factor back to 2, giving *less* weight than the cap. This change clamps an out-of-range value to the nearest bound instead of resetting to the default: - below `MIN` -> `MIN` (1) - above `MAX` -> `MAX` (10) The warning log wording is updated from "Defaulting to" to "Clamping to" accordingly. The unrelated `replication.max.streams` invalid-value handling is unchanged. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-15326 ## How was this patch tested? Unit tests in `TestReplicationConfig`: - Added `clampsOutOfServiceFactorBelowMinToMin` (configured `MIN - 0.5` -> expects `MIN`). - Added `clampsOutOfServiceFactorAboveMaxToMax` (configured `MAX + 10` -> expects `MAX`). - Split the former `overridesInvalidValues` into `overridesInvalidReplicationLimit`, since the max-streams reset-to-default behavior is unchanged. `mvn -pl hadoop-hdds/container-service test -Dtest=TestReplicationConfig` -> `Tests run: 5, Failures: 0, Errors: 0`. Module checkstyle passes. -- 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]
