Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,11 @@ protected void serviceStop() throws Exception {
* Transition to standby state in a new thread. The transition operation is
* asynchronous to avoid deadlock caused by cyclic dependency.
*/
private void handleTransitionToStandByInNewThread() {
private synchronized void handleTransitionToStandByInNewThread() {
if (rmContext.getHAServiceState() == HAServiceProtocol.HAServiceState.STANDBY) {
LOG.info("RM already in standby state");
return;
}
Thread standByTransitionThread =
new Thread(activeServices.standByTransitionRunnable);
standByTransitionThread.setName("StandByTransitionThread");
Expand Down