Description
DfsClient call ObsererNamenode throw FileNotFoundException:
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkLease(FSNamesystem.java:2898) at org.apache.hadoop.hdfs.server.namenode.FSDirWriteFileOp.analyzeFileState(FSDirWriteFileOp.java:599) at org.apache.hadoop.hdfs.server.namenode.FSDirWriteFileOp.validateAddBlock(FSDirWriteFileOp.java:171) at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:2777) at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.addBlock(NameNodeRpcServer.java:892)
addBlock operation should send to ANN,but if ANN is changed or access ANN timeout,DfsClient will find ANN from failOverProxy which ObserverNode in. If the command send to ObserverNode, ObserverNode will not block until it is synchronized with the client because the method is not readOnly.
getAdditionalBlock method check read operation and check file exits or not and check write operation finally.
I think the ObserverNameNode should not handle this method firstly