From 28b6d90a93b4949a054a3b103fb7b34b027f0175 Mon Sep 17 00:00:00 2001 From: Jean-Daniel Cryans Date: Mon, 7 Dec 2009 23:39:26 +0000 Subject: [PATCH] HBASE-2022 NPE in housekeeping kills RS git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@888193 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 1 + .../apache/hadoop/hbase/regionserver/HRegionServer.java | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 646216120bc..ca7a7fc66f2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -121,6 +121,7 @@ Release 0.21.0 - Unreleased HBASE-2018 Updates to .META. blocked under high MemStore load HBASE-1994 Master will lose hlog entries while splitting if region has empty oldlogfile.log (Lars George via Stack) + HBASE-2022 NPE in housekeeping kills RS IMPROVEMENTS HBASE-1760 Cleanup TODOs in HTable diff --git a/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index d135a5d042a..26fc1881839 100644 --- a/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ b/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -1122,9 +1122,13 @@ public class HRegionServer implements HConstants, HRegionInterface, if (this.toDo.isEmpty()) { return; } - // This iterator is 'safe'. We are guaranteed a view on state of the - // queue at time iterator was taken out. Apparently goes from oldest. + // This iterator isn't safe if elements are gone and HRS.Worker could + // remove them (it already checks for null there). Goes from oldest. for (ToDoEntry e: this.toDo) { + if(e == null) { + LOG.warn("toDo gave a null entry during iteration"); + break; + } HMsg msg = e.msg; if (msg != null) { if (msg.isType(HMsg.Type.MSG_REGION_OPEN)) {