[ 
https://issues.apache.org/jira/browse/HDDS-14769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ivan Andika updated HDDS-14769:
-------------------------------
    Summary: Client suggested leader failover mechanism does not work  (was: 
Suggested leader mechanism does not work)

> Client suggested leader failover mechanism does not work
> --------------------------------------------------------
>
>                 Key: HDDS-14769
>                 URL: https://issues.apache.org/jira/browse/HDDS-14769
>             Project: Apache Ozone
>          Issue Type: Bug
>            Reporter: Ivan Andika
>            Priority: Major
>
> When trying to improve testFailoverWithSuggestedLeader to validate whether 
> the failover proxy actually failover directly to the suggested, I found 
> suggested leader mechanism does not work (the test does not validate any 
> client failover behavior). The client-side OMNotLeaderException leaderPeerId 
> and leaderAddress are null even when the OM throws OMNotLeaderException with 
> non-null leaderPeerId and leaderAddress. 
> The issue is that currently RemoteException only supports "Exception(String)" 
> constructor. See RemoteException#instantiateException used in 
> RemoteException#unwrapRemoteException
>  
> {code:java}
> private IOException instantiateException(Class<? extends IOException> cls)
>     throws Exception {
>   Constructor<? extends IOException> cn = cls.getConstructor(String.class);
>   cn.setAccessible(true);
>   IOException ex = cn.newInstance(this.getMessage());
>   ex.initCause(this);
>   return ex;
> } {code}
> This means the client always receives OMNotLeaderException without the 
> suggested leader info.
>  
> HADOOP-18816 attempted to introduce a way to reconstruct the actual exception 
> which might be able to support suggested leader mechanism, but it has not 
> moved forward for a long time.
> Alternatively, we can use some kind of regex to get the leader peer ID and 
> leader address on the leader exception string. However, this can be fragile 
> unless it's tested. 
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to