[ https://issues.apache.org/jira/browse/HDFS-16831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17631001#comment-17631001 ]
ASF GitHub Bot commented on HDFS-16831: --------------------------------------- ZanderXu commented on code in PR #5098: URL: https://github.com/apache/hadoop/pull/5098#discussion_r1017802434 ########## hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/resolver/MembershipNamenodeResolver.java: ########## @@ -189,13 +189,45 @@ private void updateNameNodeState(final String nsId, } } + private <T extends FederationNamenodeContext> List<T> shuffleObserverNN( Review Comment: @goiri Sir, I have updated it, please help me review it. > [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 > > 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-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org