[
https://issues.apache.org/jira/browse/HDFS-17536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18022600#comment-18022600
]
ASF GitHub Bot commented on HDFS-17536:
---------------------------------------
github-actions[bot] commented on PR #6844:
URL: https://github.com/apache/hadoop/pull/6844#issuecomment-3331152328
We're closing this stale PR because it has been open for 100 days with no
activity. This isn't a judgement on the merit of the PR in any way. It's just a
way of keeping the PR queue manageable.
If you feel like this was a mistake, or you would like to continue working
on it, please feel free to re-open it and ask for a committer to remove the
stale tag and review again.
Thanks all for your contribution.
> RBF: Format safe-mode related logic and fix a race
> ---------------------------------------------------
>
> Key: HDFS-17536
> URL: https://issues.apache.org/jira/browse/HDFS-17536
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: ZanderXu
> Assignee: ZanderXu
> Priority: Major
> Labels: pull-request-available
>
> RBF: Format safe-mode related logic and fix a race.
>
> Both {{RouterAdminServer#enterSafeMode()}} and
> {{RouterSafemodeService#periodicInvoke()#leave}} can change the router state
> at the same time.
> Safe-mode change logic should be condensed into one method. And some races
> may happen in the current implementation, such as:
> # {{RouterAdminServer#enterSafeMode()}} set router stat to
> {{RouterServiceState.SAFEMODE}}
> # {{RouterSafemodeService#periodicInvoke()#leave}} got true when checking
> {{safeMode && !isSafeModeSetManually}}
> # {{RouterAdminServer#enterSafeMode()}} set {{safeMode}} and
> {{isSafeModeSetManually}} to {{true}}
> # {{RouterAdminServer#enterSafeMode()}} get {{true}} when checking safe-mode
> # {{RouterSafemodeService#periodicInvoke()#leave}} call {{leave()}} to leave
> safe-mode.
> This RBF is not in safe-mode and {{safeMode}} is {{{}false{}}}, but
> {{isSafeModeSetManually}} is {{{}true{}}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]