From ce1b81cdfd5eaa943df48f4977b125f3e690dd1c Mon Sep 17 00:00:00 2001 From: zhangduo Date: Tue, 3 Mar 2015 22:44:10 +0800 Subject: [PATCH] HBASE-13146 Race Condition in ScheduledChore and ChoreService Signed-off-by: stack --- .../src/main/java/org/apache/hadoop/hbase/ChoreService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java index f5658415e54..5e2e43ea3e0 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java @@ -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) {