hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@apache.org
Subject svn commit: r1301138 - in /hbase/branches/0.94/src: main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
Date Thu, 15 Mar 2012 18:49:41 GMT
Author: larsh
Date: Thu Mar 15 18:49:41 2012
New Revision: 1301138

URL: http://svn.apache.org/viewvc?rev=1301138&view=rev
Log:
HBASE-5569  Do not collect deleted KVs when they are still in use by a scanner.

Modified:
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java
    hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java?rev=1301138&r1=1301137&r2=1301138&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java
(original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java
Thu Mar 15 18:49:41 2012
@@ -306,7 +306,8 @@ public class ScanQueryMatcher {
       }
       // note the following next else if...
       // delete marker are not subject to other delete markers
-    } else if (!this.deletes.isEmpty()) {
+    } else if (!this.deletes.isEmpty()
+        && kv.getMemstoreTS() <= maxReadPointToTrackVersions) {
       DeleteResult deleteResult = deletes.isDeleted(bytes, offset, qualLength,
           timestamp);
       switch (deleteResult) {

Modified: hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java?rev=1301138&r1=1301137&r2=1301138&view=diff
==============================================================================
--- hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
(original)
+++ hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
Thu Mar 15 18:49:41 2012
@@ -40,7 +40,6 @@ import org.apache.hadoop.hbase.client.Pu
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
 import org.apache.hadoop.hbase.util.EnvironmentEdgeManagerTestHelper;
 import org.junit.experimental.categories.Category;
 
@@ -55,10 +54,7 @@ public class TestAtomicOperation extends
 
   HRegion region = null;
   private HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
-  private final String DIR = TEST_UTIL.getDataTestDir("TestIncrement").toString();
-
-
-  private final int MAX_VERSIONS = 2;
+  private final String DIR = TEST_UTIL.getDataTestDir("TestAtomicOperation").toString();
 
   // Test names
   static final byte[] tableName = Bytes.toBytes("testtable");;
@@ -258,10 +254,10 @@ public class TestAtomicOperation extends
     LOG.info("Starting test testRowMutationMultiThreads");
     initHRegion(tableName, getName(), fam1);
 
-    // create 100 threads, each will alternate between adding and
+    // create 50 threads, each will alternate between adding and
     // removing a column
-    int numThreads = 100;
-    int opsPerThread = 1000;
+    int numThreads = 50;
+    int opsPerThread = 500;
     AtomicOperation[] all = new AtomicOperation[numThreads];
 
     AtomicLong timeStamps = new AtomicLong(0);
@@ -340,10 +336,10 @@ public class TestAtomicOperation extends
     LOG.info("Starting test testMultiRowMutationMultiThreads");
     initHRegion(tableName, getName(), fam1);
 
-    // create 100 threads, each will alternate between adding and
+    // create 50 threads, each will alternate between adding and
     // removing a column
-    int numThreads = 100;
-    int opsPerThread = 1000;
+    int numThreads = 50;
+    int opsPerThread = 500;
     AtomicOperation[] all = new AtomicOperation[numThreads];
 
     AtomicLong timeStamps = new AtomicLong(0);



Mime
View raw message