ashvina commented on a change in pull request #1480: HDFS-14857. FS operations 
fail in HA mode: DataNode fails to connect to NameNode
URL: https://github.com/apache/hadoop/pull/1480#discussion_r332152664
 
 

 ##########
 File path: 
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ConfiguredFailoverProxyProvider.java
 ##########
 @@ -61,7 +63,10 @@ public ConfiguredFailoverProxyProvider(Configuration conf, 
URI uri,
   }
 
   @Override
-  public  void performFailover(T currentProxy) {
+  public void performFailover(T currentProxy) {
+    //reset the IP address in case  the stale IP was the cause for failover
+    LOG.info("Resetting cached proxy: " + currentProxyIndex);
+    resetProxyAddress(proxies, currentProxyIndex);
 
 Review comment:
   IIUC, this call will reset address of the proxy which will not be used by 
the caller of `getProxy`. The next instruction will change proxy index, and the 
new proxy may still have old ip address. Would it be better to reset ip of the 
proxy, if needed, after the proxy index has changed?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to