[
https://issues.apache.org/jira/browse/HDFS-16513?focusedWorklogId=756108&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-756108
]
ASF GitHub Bot logged work on HDFS-16513:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 13/Apr/22 00:36
Start Date: 13/Apr/22 00:36
Worklog Time Spent: 10m
Work Description: xkrogen commented on code in PR #4087:
URL: https://github.com/apache/hadoop/pull/4087#discussion_r848971956
##########
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.
Issue Time Tracking
-------------------
Worklog Id: (was: 756108)
Time Spent: 1h 50m (was: 1h 40m)
> [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: 1h 50m
> 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]