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