You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "ZanderXu (Jira)" <ji...@apache.org> on 2022/12/23 06:19:00 UTC

[jira] [Resolved] (HDFS-16831) [RBF SBN] GetNamenodesForNameserviceId should shuffle Observer NameNodes every time

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

ZanderXu resolved HDFS-16831.
-----------------------------
    Fix Version/s: 3.4.0
     Hadoop Flags: Reviewed
       Resolution: Fixed

> [RBF SBN] GetNamenodesForNameserviceId should shuffle Observer NameNodes every time
> -----------------------------------------------------------------------------------
>
>                 Key: HDFS-16831
>                 URL: https://issues.apache.org/jira/browse/HDFS-16831
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: ZanderXu
>            Assignee: ZanderXu
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.4.0
>
>
> The method getNamenodesForNameserviceId in MembershipNamenodeResolver.class should shuffle Observer NameNodes every time. The current logic will return the cached list and will caused all of read requests are forwarding to the first observer namenode. 
>  
> The related code as bellow:
> {code:java}
> @Override
> public List<? extends FederationNamenodeContext> getNamenodesForNameserviceId(
>     final String nsId, boolean listObserversFirst) throws IOException {
>   List<? extends FederationNamenodeContext> ret = cacheNS.get(Pair.of(nsId, listObserversFirst));
>   if (ret != null) {
>     return ret;
>   } 
>   ...
> }{code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org