Repository navigation
Conversation
…sUtil The ozone.scm.ha.raft.server.log.appender.wait-time.min conf defined in ScmRatisServerConfig was never wired into the RaftProperties built by RatisUtil.newRaftProperties: the typed default (0ms) only reached Ratis when the annotation-generated hdds-common-default.xml happened to be on the classpath, so in environments without that resource (e.g. IDE test runs, see HDDS-17700) Ratis fell back to its own 1ms default. Set Log.Appender.waitTimeMin from the ScmRatisServerConfig object the same way appendEntriesComposeEnabled is already set, so the conf is honored independently of the raw-property copy path, and move the Ratis-server-config assertions of TestSCMConfiguration#testSCMConfig into a dedicated testScmRatisServerConfigRaftProperties which also checks a user-configured wait time.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA: https://issues.apache.org/jira/browse/HDDS-17701
What / Why
ozone.scm.ha.raft.server.log.appender.wait-time.mindefined inScmRatisServerConfig(default0ms) was never wired into theRaftPropertiesbuilt byRatisUtil.newRaftProperties. The typed default only reached Ratis when the annotation-generatedhdds-common-default.xmlhappened 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 own1msdefault and the conf was effectively ignored.What this does
RatisUtil.setRaftLogPropertiesnow setsLog.Appender.waitTimeMinfrom theScmRatisServerConfigobject, mirroring howappendEntriesComposeEnabledis already wired in the same method, so the conf is honored independently of the raw-property copy path.TestSCMConfiguration#testSCMConfigmoved into a dedicatedtestScmRatisServerConfigRaftProperties, which also asserts a user-configured wait time (setLogAppenderWaitTimeMin(7)plussetFromObject).Verification
hdds-common-default.xmlfrom the test classpath:TestSCMConfiguration.testSCMConfig:217 raft.server.log.appender.wait-time.min ==> expected: <0ns> but was: <1ms>Tests run: 7, Failures: 0, Errors: 0inTestSCMConfigurationmvn -pl hadoop-hdds/server-scm checkstyle:check test -Dtest=TestSCMConfigurationpasses (7/7, checkstyle clean)