tomscut commented on code in PR #4872: URL: https://github.com/apache/hadoop/pull/4872#discussion_r1015088585
########## hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java: ########## @@ -2285,6 +2285,7 @@ public BatchedEntries<ZoneReencryptionStatus> listReencryptionStatus( public void setErasureCodingPolicy(String src, String ecPolicyName) throws IOException { checkNNStartup(); + namesystem.checkOperation(OperationCategory.WRITE); Review Comment: > @tomscut Sir, thanks for you review. > > `checkOperation` here is used to judge the HA status at the first time. If the HA status does not meet the requirement, an exception can be returned as soon as possible. > > You can see this usage in many methods. I see. But it seems unrelated to `addBlock`? Maybe we should open a new jira to add this check to all missing methods? -- 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org