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



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProvider.java
##########
@@ -342,7 +342,7 @@ private synchronized void initializeMsync() throws 
IOException {
     if (msynced) {
       return; // No need for an msync
     }
-    getProxyAsClientProtocol(failoverProxy.getProxy().proxy).msync();

Review comment:
       hi, @ayushtkn , thanks a lot for replying.
   In class ObserverReadProxyProvider, there are two varaibles used to get 
NameNode proxy. One is failoverProxy, another is nameNodeProxies. For read 
requests, it will use nameNodeProxies to get a proxy of observer namenode, but 
for msync rpc, it will use varaible failoverProxy to get an active namenode 
proxy.
   
   In practice, we found a lots of exceptions in  the observer namenode log 
like following:
   
   `org.apache.hadoop.hdfs.protocol.ClientProtocol.msync from 
10.xxx.xxx.xxx:59292
   org.apache.hadoop.ipc.ObserverRetryOnActiveException: Operation category 
WRITE is not supported in state observer. Visit https://s.apache.org/sbnn-error
   `
   we found that failoverProxy contains proxys of all kinds of namenode, so we 
want to find active namenode proxy before invoke msync rpc. There has no effect 
on sending read requests to observer namenode, because read request use 
nameNodeProxies find observer namenode rather than failoverProxy.




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