hunshenshi created HDFS-14456:
---------------------------------

             Summary: 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


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: hdfs-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org

Reply via email to