Repository navigation
Conversation
…le OM Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Generated-by: Claude Code (Opus 5.5)
What changes were proposed in this pull request?
With a single OM, the OM client increases the wait time between retries linearly and without a cap when the OM is not reachable, because round robin failover selects the same OM again and
getWaitTimetreats that as a retry on the same OM requested by the OM. A client started before OM is ready (e.g. right after starting a Docker Compose cluster) can keep sleeping long after OM is up.This change checks whether all OMs were attempted in the current round first, so a single OM gets the same fixed wait as a full round over multiple OMs. Retries on the same OM requested by the OM (e.g.
OMLeaderNotReadyException) still increase the wait time. Behavior with multiple OMs is unchanged.As a result, a client talking to a single OM that stays down gives up much sooner: with the defaults (
ozone.client.failover.max.attempts=500,ozone.client.wait.between.retries.millis=2000), the total wait drops from about 70 hours to about 17 minutes, in line with a full round over multiple OMs.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-17302
How was this patch tested?
Added
TestOMFailoverProxyProvider#testWaitTimeWithSingleNode, which fails without the fix, including when the reset of the same-OM retry count is removed. Existing failover proxy provider and transport unit tests pass.🤖 Generated with Claude Code