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
This commit is contained in:
Jean-Daniel Cryans 2009-12-07 23:39:26 +00:00
parent 5c6931f263
commit 28b6d90a93
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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)) {