From 1f8c2aeeaa0b58b9bae0f8729025e01a7866b7c9 Mon Sep 17 00:00:00 2001 From: Jim Kellerman Date: Tue, 20 Jan 2009 02:06:17 +0000 Subject: [PATCH] HBASE-1129 Master won't go down; stuck joined on rootScanner git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@735911 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 1 + src/java/org/apache/hadoop/hbase/Chore.java | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index da26e9c8de4..e6c3bbc5846 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,7 @@ Release 0.20.0 - Unreleased BUG FIXES HBASE-1140 "ant clean test" fails (Nitay Joffe via Stack) + HBASE-1129 Master won't go down; stuck joined on rootScanner IMPROVEMENTS HBASE-1089 Add count of regions on filesystem to master UI; add percentage diff --git a/src/java/org/apache/hadoop/hbase/Chore.java b/src/java/org/apache/hadoop/hbase/Chore.java index e80e633a01e..3c53ebc663e 100644 --- a/src/java/org/apache/hadoop/hbase/Chore.java +++ b/src/java/org/apache/hadoop/hbase/Chore.java @@ -55,14 +55,15 @@ public abstract class Chore extends Thread { @Override public void run() { try { - while (!initialChore()) { - this.sleeper.sleep(); - } - this.sleeper.sleep(); + boolean initialChoreComplete = false; while (!this.stop.get()) { long startTime = System.currentTimeMillis(); try { - chore(); + if (!initialChoreComplete) { + initialChoreComplete = initialChore(); + } else { + chore(); + } } catch (Exception e) { LOG.error("Caught exception", e); if (this.stop.get()) {