echonesis opened a new pull request, #12040: URL: https://github.com/apache/ozone/pull/12040
## What changes were proposed in this pull request? OM leadership transfer is not idempotent when a timed-out request is retried on the new leader. Although the requested target is already the leader, the handler starts another priority-setting / transfer / priority-reset cycle. This can overlap the original request and cause an unintended leader change. This pull request: - Returns success immediately when the requested target is already the leader, avoiding another priority update or transfer cycle while preserving existing client failover behavior. - Adds regression coverage for repeated explicit-target requests after a successful transfer, verifying that the leader, term, configuration log index, and neutral priorities remain unchanged. - Adds a negative test confirming that an unknown OM target fails without changing the leader. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-17125 ## How was this patch tested? Local Test ``` mvn -pl :ozone-integration-test test \ -Dtest=TestTransferLeadershipShell \ -DskipShade -DskipRecon ``` GitHub Actions CI: https://github.com/echonesis/ozone/actions/runs/43381688173 Generated-by: Codex (GPT-6) -- 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]
