From 77a128ade07530b4e8816cc32c764ce3cde9e323 Mon Sep 17 00:00:00 2001 From: Jim Kellerman Date: Tue, 13 Jan 2009 20:04:59 +0000 Subject: [PATCH] HBASE-1125 IllegalStateException: Cannot set a region to be closed if it was not already marked as pending close We now allow transition from either pendingOpen or pendingClose to closed. git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@734226 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 2 ++ src/java/org/apache/hadoop/hbase/master/RegionManager.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 092eee71f92..de407af02b4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -140,6 +140,8 @@ Release 0.19.0 - Unreleased HBASE-1116 generated web.xml and svn don't play nice together HBASE-1119 ArrayOutOfBoundsException in HStore.compact HBASE-1121 Cluster confused about where -ROOT- is + HBASE-1125 IllegalStateException: Cannot set a region to be closed if it was + not already marked as pending close IMPROVEMENTS HBASE-901 Add a limit to key length, check key and value length on client side diff --git a/src/java/org/apache/hadoop/hbase/master/RegionManager.java b/src/java/org/apache/hadoop/hbase/master/RegionManager.java index 0db9f83aaf6..909b6998850 100644 --- a/src/java/org/apache/hadoop/hbase/master/RegionManager.java +++ b/src/java/org/apache/hadoop/hbase/master/RegionManager.java @@ -1174,10 +1174,10 @@ class RegionManager implements HConstants { } synchronized void setClosed() { - if (!pendingClose) { + if (!pendingClose && !pendingOpen) { throw new IllegalStateException( "Cannot set a region to be closed if it was not already marked as" + - " pending close. State: " + toString()); + " pending close or pending open. State: " + toString()); } this.unassigned = false; this.pendingOpen = false;