smengcl opened a new pull request, #10999: URL: https://github.com/apache/ozone/pull/10999
Generated-by: Codex (GPT-5.6 Sol) ## What changes were proposed in this pull request? This fixes a production liveness issue in SCM HA, not only a flaky test. A follower SCM restarted in an otherwise idle cluster can remain in safe mode indefinitely. The initial Ratis `notifyLeaderChanged` callback may run before the leader commit index is visible, so the existing catch-up check cannot yet start the deferred datanode protocol server. Ratis 3.2.1 can learn the leader commit index from a later heartbeat, but it does not expose a state-machine callback when that heartbeat updates the commit information. If no new transaction is applied, Ozone receives no later callback that would re-run the catch-up check. The ideal long-term fix is an event-driven Ratis callback or future for this progress update. With the current Ratis API, Ozone must recheck the condition. This patch uses a dedicated single-thread scheduled executor to retry the existing `tryStartDNServerAndRefreshSafeMode()` path. The existing readiness predicate remains the authority for startup, so the datanode protocol server cannot start until the follower has genuinely caught up. The retry stops after readiness, and the executor is explicitly shut down with the SCM state machine; making its thread a daemon is only an additional process-shutdown safeguard. The change introduces no RPC, wire-format, storage-format, or configuration compatibility changes. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-16132 ## How was this patch tested? - `mvn -pl hadoop-ozone/integration-test -am test -Dtest=TestSCMFollowerCatchupWithContainerReport -DskipShade -DskipRecon -DskipDocs` (3 tests passed) - `mvn -o -pl hadoop-hdds/server-scm checkstyle:check` -- 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]
