HDDS-14989. Delay follower SCM DN server start until Ratis log catch-up.#10617
Draft
ArafatKhan2198 wants to merge 2 commits into
Draft
HDDS-14989. Delay follower SCM DN server start until Ratis log catch-up.#10617ArafatKhan2198 wants to merge 2 commits into
ArafatKhan2198 wants to merge 2 commits into
Conversation
…ring cluster Reduce test execution time by ~60% (2m28s → ~1m) via three targeted optimizations: 1. Share one cluster across all three test methods (@BeforeAll/@afterall instead of @BeforeEach/@AfterEach). This eliminates 2 of 3 cluster bring-up cycles, which account for ~80-90% of the test duration. Each test uses its own volume/bucket name to avoid collisions on the shared cluster. 2. Lower the datanode heartbeat interval to 1 second in the config. This speeds safe-mode exit at startup and replica re-reporting after the deferred DN-server start, both happening in ~1s instead of default timers. 3. Tighten the waitFor poll interval from 1000ms to 250ms. This allows the test to notice when async conditions (safe-mode exit, leadership transfer) are met sooner, without changing the timeout ceilings. The test essence is fully preserved: 3 SCMs, 3 DNs, 5-minute report interval, down→mutate→restart→catch-up→promote sequence all unchanged. Only the test harness (cluster setup and polling) was optimized. The regression still catches empty replicas on the unfixed code and confirms full replicas on the fix. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Contributor
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?
When an SCM follower restarts in an HA cluster, it used to start talking to datanodes right away, even while it was still catching up on the Ratis log.
That caused problems:
CONTAINER_NOT_FOUNDNotLeaderExceptionThe fix:
SCMStateMachine.Why: Replica locations are rebuilt from datanode reports. Those reports must only be processed after the SCM has replayed all committed Ratis entries.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14989
How was this patch tested?
Integration tests
TestSCMFollowerCatchupWithContainerReport -
testFollowerCatchupAfterContainerClose— close-while-down (HDDS-14989 scenario)testFollowerCatchupAfterContainerCreate— create-while-down (CONTAINER_NOT_FOUNDscenario)testFollowerCatchupOnIdleCluster— idle cluster edge caseManual test (docker-compose
ozone-ha)Environment:
hadoop-ozone/dist/target/ozone-2.3.0-SNAPSHOT/compose/ozone-haConfig: RF=3, 3 datanodes,
hdds.container.report.interval=1h,ozone.scm.container.size=1GBProcedure (same for with/without fix):
OZONE_REPLICATION_FACTOR=3 docker compose up -d --scale datanode=3vol1/buck1(containers 1–3)vol1/buck2(creates containers 4, 5, 6 while scm3 is down)ozone admin container infofor containers 4–6Without the fix:
After leadership transfer, containers 4–6 had 1 replica each (expected 3).
With the fix:
CONTAINER_NOT_FOUNDon scm3: 0