HBASE-13146 Race Condition in ScheduledChore and ChoreService
Signed-off-by: stack <stack@apache.org>
This commit is contained in:
parent
3897ab05a4
commit
ce1b81cdfd
@ -131,10 +131,10 @@ public class ChoreService implements ChoreServicer {
|
|||||||
if (chore == null) return false;
|
if (chore == null) return false;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
chore.setChoreServicer(this);
|
||||||
ScheduledFuture<?> future =
|
ScheduledFuture<?> future =
|
||||||
scheduler.scheduleAtFixedRate(chore, chore.getInitialDelay(), chore.getPeriod(),
|
scheduler.scheduleAtFixedRate(chore, chore.getInitialDelay(), chore.getPeriod(),
|
||||||
chore.getTimeUnit());
|
chore.getTimeUnit());
|
||||||
chore.setChoreServicer(this);
|
|
||||||
scheduledChores.put(chore, future);
|
scheduledChores.put(chore, future);
|
||||||
return true;
|
return true;
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user