mirror of https://github.com/apache/druid.git
Make TaskMaster giant lock fair (#3050)
This commit is contained in:
parent
13c267bfee
commit
474286bbce
|
@ -53,7 +53,7 @@ import java.util.concurrent.locks.ReentrantLock;
|
||||||
public class TaskMaster
|
public class TaskMaster
|
||||||
{
|
{
|
||||||
private final LeaderSelector leaderSelector;
|
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 Condition mayBeStopped = giant.newCondition();
|
||||||
private final TaskActionClientFactory taskActionClientFactory;
|
private final TaskActionClientFactory taskActionClientFactory;
|
||||||
private final SupervisorManager supervisorManager;
|
private final SupervisorManager supervisorManager;
|
||||||
|
@ -145,6 +145,7 @@ public class TaskMaster
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (InterruptedException e) {
|
catch (InterruptedException e) {
|
||||||
|
log.debug("Interrupted while waiting");
|
||||||
// Suppress so we can bow out gracefully
|
// Suppress so we can bow out gracefully
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
|
Loading…
Reference in New Issue