HBASE-13146 Race Condition in ScheduledChore and ChoreService

Signed-off-by: stack <stack@apache.org>
This commit is contained in:
zhangduo 2015-03-03 22:44:10 +08:00 committed by stack
parent 3897ab05a4
commit ce1b81cdfd
1 changed files with 1 additions and 1 deletions

View File

@ -131,10 +131,10 @@ public class ChoreService implements ChoreServicer {
if (chore == null) return false;
try {
chore.setChoreServicer(this);
ScheduledFuture<?> future =
scheduler.scheduleAtFixedRate(chore, chore.getInitialDelay(), chore.getPeriod(),
chore.getTimeUnit());
chore.setChoreServicer(this);
scheduledChores.put(chore, future);
return true;
} catch (Exception exception) {