[ 
https://issues.apache.org/jira/browse/HDFS-16513?focusedWorklogId=756135&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-756135
 ]

ASF GitHub Bot logged work on HDFS-16513:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/Apr/22 02:05
            Start Date: 13/Apr/22 02:05
    Worklog Time Spent: 10m 
      Work Description: tomscut commented on code in PR #4087:
URL: https://github.com/apache/hadoop/pull/4087#discussion_r849006815


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java:
##########
@@ -1938,6 +1938,14 @@ public boolean isInStandbyState() {
         HAServiceState.OBSERVER == haContext.getState().getServiceState();
   }
 
+  public boolean isInObserverState() {
+    if (haContext == null || haContext.getState() == null) {
+      return haEnabled;

Review Comment:
   > Seems like this was probably copied from `isInStandbyState()`? But I don't 
think it's right. If we can't find a state, we assume `STANDBY` state. If we 
assume `STANDBY` state because a valid state could not be found, then 
`isInObserverState()` should be false. So I think we should just `return false` 
here.
   
   I agree with you. Thanks.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 756135)
    Time Spent: 2h 20m  (was: 2h 10m)

> [SBN read] Observer Namenode should not trigger the edits rolling of active 
> Namenode
> ------------------------------------------------------------------------------------
>
>                 Key: HDFS-16513
>                 URL: https://issues.apache.org/jira/browse/HDFS-16513
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: tomscut
>            Assignee: tomscut
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> To avoid frequent edtis rolling, we should disable OBN from triggering the 
> edits rolling of active Namenode. 
> It is sufficient to retain only the triggering of SNN and the auto rolling of 
> ANN. 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to