You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by te...@apache.org on 2012/01/10 00:21:48 UTC

svn commit: r1229417 - in /hbase/branches/0.92: CHANGES.txt src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java

Author: tedyu
Date: Mon Jan  9 23:21:47 2012
New Revision: 1229417

URL: http://svn.apache.org/viewvc?rev=1229417&view=rev
Log:
HBASE-5152  Region is on service before completing initialization when doing rollback of split,
               it will affect read correctness (Chunhui)

Modified:
    hbase/branches/0.92/CHANGES.txt
    hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java

Modified: hbase/branches/0.92/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/CHANGES.txt?rev=1229417&r1=1229416&r2=1229417&view=diff
==============================================================================
--- hbase/branches/0.92/CHANGES.txt (original)
+++ hbase/branches/0.92/CHANGES.txt Mon Jan  9 23:21:47 2012
@@ -513,6 +513,8 @@ Release 0.92.0 - Unreleased
    HBASE-5052  The path where a dynamically loaded coprocessor jar is copied on the
                local file system depends on the region name (and implicitly, the
                start key) Andrei Dragomir
+   HBASE-5152  Region is on service before completing initialization when doing rollback of split,
+               it will affect read correctness (Chunhui)
 
   TESTS
    HBASE-4492  TestRollingRestart fails intermittently

Modified: hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=1229417&r1=1229416&r2=1229417&view=diff
==============================================================================
--- hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java (original)
+++ hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java Mon Jan  9 23:21:47 2012
@@ -49,7 +49,6 @@ import java.util.concurrent.atomic.Atomi
 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;
@@ -112,6 +111,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;
 
 /**
@@ -414,9 +414,6 @@ public class HRegion implements HeapSize
       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");
@@ -488,11 +485,15 @@ public class HRegion implements HeapSize
     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;
   }