Repository navigation
HDFS-17982. RBF should return StandbyException when no Active NameNode is known - #8760
Merged
Merged
Conversation
Contributor
Author
|
@ZanderXu @haiyang1987 @kokonguyen191 Masters, plz check it when you are available |
CapMoon
added a commit
to CapMoon/hadoop
that referenced
this pull request
Sep 29, 2026
|
💔 -1 overall
This message was automatically generated. |
Member
|
@CapMoon can u rebase the PR |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused fix correctly handles the empty exception map and is covered by a regression test.
Review effort: Balanced
Findings: None
What changed in this PR
Corrects Router failure handling when all known NameNodes are skipped Observers.
Changes:
- Returns
StandbyExceptionwhen no RPC was attempted. - Adds asynchronous regression coverage for Observer-only candidates.
| File | Description |
|---|---|
RouterRpcClient.java |
Distinguishes empty failures from connection failures. |
TestRouterAsyncRpcClient.java |
Verifies the expected retryable exception. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
🎊 +1 overall
This message was automatically generated. |
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.
HDFS-17982. RBF should return StandbyException when no Active NameNode is known
Description of PR
A Router may have an incomplete view of the NameNodes in a nameservice and know only about Observer NameNodes. When a request must be forwarded to the Active NameNode, the Router skips those Observer candidates and makes no RPC calls. As a result, the collected IOException map is empty.
The current failure handling can treat this empty map as if every candidate failed to connect and return ConnectException. Instead, the Router should return StandbyException so the client can retry the request through another Router.
How was this patch tested?
Add a regression test that invokes a request with only Observer candidates when Observer reads are disabled, and verifies that the Router returns StandbyException when no NameNode RPC is attempted.