ZanderXu opened a new pull request, #5098:
URL: https://github.com/apache/hadoop/pull/5098

   ### Description of PR
   [HDFS-16831](https://issues.apache.org/jira/browse/HDFS-16831)
   
   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:
   ```
   @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;
     } 
     ...
   }
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to