[ https://issues.apache.org/jira/browse/HDFS-16547?focusedWorklogId=765220&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-765220 ]
ASF GitHub Bot logged work on HDFS-16547: ----------------------------------------- Author: ASF GitHub Bot Created on: 02/May/22 23:56 Start Date: 02/May/22 23:56 Worklog Time Spent: 10m Work Description: tomscut commented on code in PR #4201: URL: https://github.com/apache/hadoop/pull/4201#discussion_r863251873 ########## hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java: ########## @@ -1899,6 +1899,10 @@ synchronized void transitionToStandby() throws IOException { synchronized void transitionToObserver() throws IOException { String operationName = "transitionToObserver"; namesystem.checkSuperuserPrivilege(operationName); + if (namesystem.isInSafeMode()) { Review Comment: Thank you @xkrogen very much for the review and careful suggestions. The intent here is really the same as `dfs.ha.nn.not-become-active-in-safemode`. It's just that the configuration name looks a bit conflicting. A more appropriate name would be dfs.ha.nn.do.not-accept-requests-in-safemode. Maybe we can change it later. ########## hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java: ########## @@ -1899,6 +1899,10 @@ synchronized void transitionToStandby() throws IOException { synchronized void transitionToObserver() throws IOException { String operationName = "transitionToObserver"; namesystem.checkSuperuserPrivilege(operationName); + if (namesystem.isInSafeMode()) { Review Comment: Thank you @xkrogen very much for the review and careful suggestions. The intent here is really the same as `dfs.ha.nn.not-become-active-in-safemode`. It's just that the configuration name looks a bit conflicting. A more appropriate name would be `dfs.ha.nn.do.not-accept-requests-in-safemode`. Maybe we can change it later. Issue Time Tracking ------------------- Worklog Id: (was: 765220) Time Spent: 1h 10m (was: 1h) > [SBN read] Namenode in safe mode should not be transfered to observer state > --------------------------------------------------------------------------- > > Key: HDFS-16547 > URL: https://issues.apache.org/jira/browse/HDFS-16547 > Project: Hadoop HDFS > Issue Type: Improvement > Reporter: Tao Li > Assignee: Tao Li > Priority: Major > Labels: pull-request-available > Time Spent: 1h 10m > Remaining Estimate: 0h > > Currently, when a Namenode is in safemode(under starting or enter safemode > manually), we can transfer this Namenode to Observer by command. This > Observer node may receive many requests and then throw a SafemodeException, > this causes unnecessary failover on the client. > So Namenode in safe mode should not be transfer to observer state. -- This message was sent by Atlassian Jira (v8.20.7#820007) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org