billy784512 opened a new pull request, #11893: URL: https://github.com/apache/ozone/pull/11893
## What changes were proposed in this pull request? OM bootstrap can fail if the leader loses leadership after Ratis accepts the membership change, or if the RPC times out while the change is still in progress. The change may still commit, leaving the new OM stopped but present in the Raft configuration. Currently: - Leadership loss produces a `NotLeaderException`. - A RPC timeout retry can produces `ReconfigurationInProgressException` if the first request is still processing. - Both become a `success=false` bootstrap response, causing the new OM to shut down. This patch: - Converts `NotLeaderException` to `OMNotLeaderException` so the existing failover proxy retries against another OM. - Converts `ReconfigurationInProgressException` to `OMLeaderNotReadyException` so the proxy waits and retries the same OM. - Propagates these exceptions through the bootstrap RPC instead of returning a terminal failure response. - Avoids adding duplicate peers on retry while still asking Ratis to confirm the configuration. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-16839 ## How was this patch tested? Added two integration tests in `TestAddRemoveOzoneManager`: - **Leadership loss**: Delays `AppendEntries` to trigger a real leader step-down during the membership change. The failure reply is held until the new leader applies the configuration, so retries do not race with the election. - **RPC timeout**: Holds the first request until the client times out, then injects `ReconfigurationInProgressException` on retry while allowing the original request to continue. Both tests verify that bootstrap succeeds, the new OM remains running, and the final Raft configuration contains the expected members without duplicates -- 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]
