[ 
https://issues.apache.org/jira/browse/HDFS-14456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wei-Chiu Chuang updated HDFS-14456:
-----------------------------------
    Status: Patch Available  (was: Open)

> 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
>            Priority: Major
>
> 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.3#76005)

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

Reply via email to