mitsa-ng opened a new pull request, #12134:
URL: https://github.com/apache/ozone/pull/12134

   JIRA: https://issues.apache.org/jira/browse/HDDS-17701
   
   ## What / Why
   
   `ozone.scm.ha.raft.server.log.appender.wait-time.min` defined in 
`ScmRatisServerConfig` (default `0ms`) was never wired into the 
`RaftProperties` built by `RatisUtil.newRaftProperties`. The typed default only 
reached Ratis when the annotation-generated `hdds-common-default.xml` happened 
to be loaded as a raw property and picked up by the trailing prefix-copy, so in 
environments without that resource on the classpath (for example IDE test runs, 
see HDDS-17700) Ratis fell back to its own `1ms` default and the conf was 
effectively ignored.
   
   ## What this does
   
   - `RatisUtil.setRaftLogProperties` now sets `Log.Appender.waitTimeMin` from 
the `ScmRatisServerConfig` object, mirroring how `appendEntriesComposeEnabled` 
is already wired in the same method, so the conf is honored independently of 
the raw-property copy path.
   - The Ratis-server-config assertions of `TestSCMConfiguration#testSCMConfig` 
moved into a dedicated `testScmRatisServerConfigRaftProperties`, which also 
asserts a user-configured wait time (`setLogAppenderWaitTimeMin(7)` plus 
`setFromObject`).
   
   ## Verification
   
   - Reproduced the HDDS-17700 failure on trunk by removing 
`hdds-common-default.xml` from the test classpath: 
`TestSCMConfiguration.testSCMConfig:217 raft.server.log.appender.wait-time.min 
==> expected: <0ns> but was: <1ms>`
   - With this change the same environment passes: `Tests run: 7, Failures: 0, 
Errors: 0` in `TestSCMConfiguration`
   - Normal environment: `mvn -pl hadoop-hdds/server-scm checkstyle:check test 
-Dtest=TestSCMConfiguration` passes (7/7, checkstyle clean)


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