[
https://issues.apache.org/jira/browse/HDFS-14456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wei-Chiu Chuang updated HDFS-14456:
-----------------------------------
Resolution: Fixed
Fix Version/s: 3.3.0
Status: Resolved (was: Patch Available)
PR was merged. Resolve this jira. Thanks [~hunhun]!
> HAState#prepareToEnterState needn't a lock
> ------------------------------------------
>
> Key: HDFS-14456
> URL: https://issues.apache.org/jira/browse/HDFS-14456
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: hdfs
> Affects Versions: 3.2.0
> Reporter: hunshenshi
> Assignee: hunshenshi
> Priority: Major
> Fix For: 3.3.0
>
>
> prepareToEnterState in HAState is called without the context being locked.
> But in NameNode#NameNode, prepareToEnterState is after haContext.writeLock()
>
> {code:java}
> try {
> haContext.writeLock();
> state.prepareToEnterState(haContext);
> state.enterState(haContext);
> } finally {
> haContext.writeUnlock();
> }
> {code}
>
> Is it OK?
>
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]