Make TaskMaster giant lock fair (#3050)

This commit is contained in:
Charles Allen 2016-06-02 12:10:40 -07:00 committed by Gian Merlino
parent 13c267bfee
commit 474286bbce
1 changed files with 2 additions and 1 deletions

View File

@ -53,7 +53,7 @@ import java.util.concurrent.locks.ReentrantLock;
public class TaskMaster
{
private final LeaderSelector leaderSelector;
private final ReentrantLock giant = new ReentrantLock();
private final ReentrantLock giant = new ReentrantLock(true);
private final Condition mayBeStopped = giant.newCondition();
private final TaskActionClientFactory taskActionClientFactory;
private final SupervisorManager supervisorManager;
@ -145,6 +145,7 @@ public class TaskMaster
}
}
catch (InterruptedException e) {
log.debug("Interrupted while waiting");
// Suppress so we can bow out gracefully
}
finally {