Make TaskLockbox's ReentrantLock fair (#3828)

This commit is contained in:
Charles Allen 2017-01-07 12:34:47 -08:00 committed by Fangjin Yang
parent 3c012305d1
commit 229559b46a
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ public class TaskLockbox
// Datasource -> Interval -> Tasks + TaskLock
private final Map<String, NavigableMap<Interval, TaskLockPosse>> running = Maps.newHashMap();
private final TaskStorage taskStorage;
private final ReentrantLock giant = new ReentrantLock();
private final ReentrantLock giant = new ReentrantLock(true);
private final Condition lockReleaseCondition = giant.newCondition();
private static final EmittingLogger log = new EmittingLogger(TaskLockbox.class);