Skip to content

Conversation

@JacksonYao287
Copy link
Contributor

@JacksonYao287 JacksonYao287 commented Oct 25, 2021

What changes were proposed in this pull request?

for now , ozone client will not fail over to leader if a notLeader exception is thrown,it just performFailoverToNextProxy
this patch adds suggested LeaderID in NotLeaderException , so that ozone client can fail over according to the suggested leader

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-5889

Please replace this section with the link to the Apache JIRA)

How was this patch tested?

current UT

@JacksonYao287 JacksonYao287 force-pushed the HDDS-5889 branch 2 times, most recently from 63ac939 to 1900f83 Compare October 26, 2021 08:32
@hanishakoneru
Copy link
Contributor

@JacksonYao287, previously the client would failover to the suggested leader. It was changed in HDDS-3334 as it caused issues if the client configs are not in line with the server configs. For example, let's say the server nodeId to OM address mapping is as follows:

om1 -> node1
om2 -> node2
om3 -> node3

But the client configuration has this mapping as follows:

om1 -> node2
om2 -> node3
om1 -> node1

Let's say the leader is node1. Client contacts node2 and gets back suggested leader as om1 (as per the server). So it fails over to om1 (which according to its configuration is node2). So it contacts node2 again and this loop is repeated and client never fails over to the correct leader.

Though generally we don't expect client and server mappings to be different, it is possible to have. So, it would be good to failover based on node address than to rely just on the nodeId.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants