HDFS-14456:HAState#prepareToEnterState neednt a lock (#770) Contributed by hunshenshi.
This commit is contained in:
parent
8943e1340d
commit
a38b9e137e
@ -982,9 +982,9 @@ protected NameNode(Configuration conf, NamenodeRole role)
|
||||
try {
|
||||
initializeGenericKeys(conf, nsId, namenodeId);
|
||||
initialize(getConf());
|
||||
state.prepareToEnterState(haContext);
|
||||
try {
|
||||
haContext.writeLock();
|
||||
state.prepareToEnterState(haContext);
|
||||
state.enterState(haContext);
|
||||
} finally {
|
||||
haContext.writeUnlock();
|
||||
|
Loading…
Reference in New Issue
Block a user