[ 
https://issues.apache.org/jira/browse/HDFS-14660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16888039#comment-16888039
 ] 

Erik Krogen commented on HDFS-14660:
------------------------------------

Hey [~ayushtkn], thanks for pinging me and sorry for not responding to your 
last comment. I agree with you that the behavior can be misleading; it is a 
situation that we didn't think through fully when we were working on the 
feature (we use IPFailoverProxyProvider which doesn't have this issue).

{quote}
I guess there is a specific behavior too, for when state ID isn't set i.e -1, 
The Observer serves the request without being bothered of the state. I am not 
sure if somebody had a use case for that. But to handle this scenario. This 
behavior would have to be changed.
{quote}

Since all negative state IDs are invalid, perhaps we can define a special 
constant value (-2 ?) for indicating that the observer should serve the request 
without state checking, and clients which haven't set an ID at all (-1) can be 
rejected outright.

> [SBN Read] ObserverNameNode should throw StandbyException for requests not 
> from ObserverProxyProvider
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-14660
>                 URL: https://issues.apache.org/jira/browse/HDFS-14660
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Chao Sun
>            Assignee: Chao Sun
>            Priority: Major
>
> In a HDFS HA cluster with consistent reads enabled (HDFS-12943), clients 
> could be using either {{ObserverReadProxyProvider}}, 
> {{ConfiguredProxyProvider}}, or something else. Since observer is just a 
> special type of SBN and we allow transitions between them, a client NOT using 
> {{ObserverReadProxyProvider}} will need to have 
> {{dfs.ha.namenodes.<nameservice>}} include all NameNodes in the cluster, and 
> therefore, it may send request to a observer node.
> For this case, we should check whether the {{stateId}} in the incoming RPC 
> header is set or not, and throw an {{StandbyException}} when it is not. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

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

Reply via email to