hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1559226 - /hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Date Fri, 17 Jan 2014 19:10:59 GMT
Author: stack
Date: Fri Jan 17 19:10:58 2014
New Revision: 1559226

URL: http://svn.apache.org/r1559226
Log:
HBASE-10370 Compaction in out-of-date Store causes region split failed

Modified:
    hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java

Modified: hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=1559226&r1=1559225&r2=1559226&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
(original)
+++ hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Fri Jan 17 19:10:58 2014
@@ -1284,6 +1284,14 @@ public class HRegion implements HeapSize
     // block waiting for the lock for compaction
     lock.readLock().lock();
     try {
+      byte[] cf = Bytes.toBytes(store.getColumnFamilyName());
+      if (stores.get(cf) != store) {
+        LOG.warn("Store " + store.getColumnFamilyName() + " on region " + this
+            + " has been re-instantiated, cancel this compaction request. "
+            + " It may be caused by the roll back of split transaction");
+        return false;
+      }
+
       status = TaskMonitor.get().createStatus("Compacting " + store + " in " + this);
       if (this.closed.get()) {
         String msg = "Skipping compaction on " + this + " because closed";



Mime
View raw message