hfutatzhanghb commented on a change in pull request #3976:
URL: https://github.com/apache/hadoop/pull/3976#discussion_r817294790



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProvider.java
##########
@@ -368,6 +368,21 @@ private boolean shouldFindObserver() {
     return true;
   }
 
+  private void confirmActiveToMsync() throws IOException {
+    ClientProtocol activeProxy = (ClientProtocol) getCurrentProxy().proxy;
+    for (int i = 0; i < nameNodeProxies.size(); i++) {
+      NNProxyInfo<T> current = getCurrentProxy();
+      HAServiceState currState = current.getCachedState();
+      if (currState == HAServiceState.ACTIVE) {
+        activeProxy = getProxyAsClientProtocol(current.proxy);
+        LOG.info("active proxy is choosed :{}", current);
+        break;
+      } else {
+        changeProxy(current);

Review comment:
       > 
   
   Hi, @ayushtkn . the subsequent calls will not go to active.




-- 
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