[
https://issues.apache.org/jira/browse/HDFS-14660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16890699#comment-16890699
]
Chao Sun commented on HDFS-14660:
---------------------------------
Thanks [~ayushtkn] and [~Harsha1206] for the feedback!
{quote}Regarding the test. I guess we should assert the standby exception from
the Observer, which is the actual intention, so as to be sure observer didn't
serve when configured without observer proxy provider, and it serves when it is
configured.
{quote}
I guess the current test covers this by checking that when hitting observer,
the client fails over and goes to the active. It checks the request is served
by the observer since otherwise the number of files from `listStatus` should be
0, not 1. I agree ideally it might be better to explicitly check this is a
{{StandbyException}} from observer, but I'm lacking ideas on how to do that in
a simple manner. Do you know happen to know anyway that can allow me to do that
easily?
The comment on the ordering and finally block looks good. I'll make the change.
> [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
> Attachments: HDFS-14660.000.patch, HDFS-14660.001.patch
>
>
> 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]