HDDS-15918. Optimize TestSCMNodeManager execution time and stability by reducing heartbeat configs#10837
Open
rich7420 wants to merge 1 commit into
Open
HDDS-15918. Optimize TestSCMNodeManager execution time and stability by reducing heartbeat configs#10837rich7420 wants to merge 1 commit into
rich7420 wants to merge 1 commit into
Conversation
…by reducing heartbeat configs Lower the second-level heartbeat interval and stale/dead node timeouts to 100ms/1s/2s and replace fixed Thread.sleep waits with GenericTestUtils.waitFor polling so the node-state transition tests converge quickly and tolerate slow CI. Reduces TestSCMNodeManager wall time ~104s -> ~82s with all 48 tests passing. Config-validation and stats tests that do not wait on stale/dead are left unchanged.
Contributor
Author
|
cc @chungen0126 |
Contributor
|
Thanks @rich7420 for working on this. Could you also share the run time of the test? I hope it will speed up the test. |
Contributor
Author
|
Thanks @chungen0126! Full TestSCMNodeManager goes from ~104s to ~82s on my machine (48 tests, about 20% faster). |
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.
What changes were proposed in this pull request?
Since TestSCMNodeManager should be lighter as it is an unit test. The heartbeat intervals and node state timeouts are configured in seconds, which unnecessarily prolongs the test duration. It will be better to set heartbeat interval and timeouts to a lower value. For example 100ms for heartbeats.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15918
How was this patch tested?
https://github.com/rich7420/ozone/actions/runs/29815586760
try 100times
https://github.com/rich7420/ozone/actions/runs/29815603643