diff --git a/CHANGES.txt b/CHANGES.txt index 0b7ade4ba09..34ff93981d9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -473,6 +473,8 @@ Release 0.92.0 - Unreleased HBASE-5081 Distributed log splitting deleteNode races against splitLog retry (Prakash) HBASE-4357 Region stayed in transition - in closing state (Ming Ma) HBASE-5088 A concurrency issue on SoftValueSortedMap (Jieshan Bean and Lars H) + HBASE-5152 Region is on service before completing initialization when doing rollback of split, + it will affect read correctness (Chunhui) TESTS HBASE-4450 test for number of blocks read: to serve as baseline for expected diff --git a/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java index fb4ec05122c..354ae4eec68 100644 --- a/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java +++ b/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java @@ -50,7 +50,6 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.locks.ReentrantReadWriteLock; -import com.google.common.collect.Maps; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; @@ -116,6 +115,7 @@ import org.cliffc.high_scale_lib.Counter; import com.google.common.base.Preconditions; import com.google.common.collect.ClassToInstanceMap; import com.google.common.collect.Lists; +import com.google.common.collect.Maps; import com.google.common.collect.MutableClassToInstanceMap; /** @@ -513,9 +513,6 @@ public class HRegion implements HeapSize { // , Writable{ status.setStatus("Running coprocessor pre-open hook"); coprocessorHost.preOpen(); } - // A region can be reopened if failed a split; reset flags - this.closing.set(false); - this.closed.set(false); // Write HRI to a file in case we need to recover .META. status.setStatus("Writing region info on filesystem"); @@ -587,11 +584,15 @@ public class HRegion implements HeapSize { // , Writable{ long nextSeqid = maxSeqId + 1; LOG.info("Onlined " + this.toString() + "; next sequenceid=" + nextSeqid); + // A region can be reopened if failed a split; reset flags + this.closing.set(false); + this.closed.set(false); if (coprocessorHost != null) { status.setStatus("Running coprocessor post-open hooks"); coprocessorHost.postOpen(); } + status.markComplete("Region opened successfully"); return nextSeqid; }