YARN-4424. Fix deadlock in RMAppImpl. (Jian he via wangda)

This commit is contained in:
Wangda Tan 2015-12-08 14:25:16 -08:00
parent c4084d9bc3
commit 7e4715186d
2 changed files with 10 additions and 14 deletions

View File

@ -2032,6 +2032,8 @@ Release 2.6.3 - UNRELEASED
YARN-4348. ZKRMStateStore.syncInternal shouldn't wait for sync completion for YARN-4348. ZKRMStateStore.syncInternal shouldn't wait for sync completion for
avoiding blocking ZK's event thread. (ozawa) avoiding blocking ZK's event thread. (ozawa)
YARN-4424. Fix deadlock in RMAppImpl. (Jian he via wangda)
Release 2.6.2 - 2015-10-28 Release 2.6.2 - 2015-10-28
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -490,8 +490,6 @@ public ApplicationSubmissionContext getApplicationSubmissionContext() {
@Override @Override
public FinalApplicationStatus getFinalApplicationStatus() { public FinalApplicationStatus getFinalApplicationStatus() {
this.readLock.lock();
try {
// finish state is obtained based on the state machine's current state // finish state is obtained based on the state machine's current state
// as a fall-back in case the application has not been unregistered // as a fall-back in case the application has not been unregistered
// ( or if the app never unregistered itself ) // ( or if the app never unregistered itself )
@ -500,11 +498,7 @@ public FinalApplicationStatus getFinalApplicationStatus() {
&& currentAttempt.getFinalApplicationStatus() != null) { && currentAttempt.getFinalApplicationStatus() != null) {
return currentAttempt.getFinalApplicationStatus(); return currentAttempt.getFinalApplicationStatus();
} }
return return createFinalApplicationStatus(this.stateMachine.getCurrentState());
createFinalApplicationStatus(this.stateMachine.getCurrentState());
} finally {
this.readLock.unlock();
}
} }
@Override @Override