diff --git a/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java b/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java index 1b923cf760f..2ab3d3b3ddc 100644 --- a/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java +++ b/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java @@ -308,7 +308,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) { diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java index 1640f296b0f..c6568703b40 100644 --- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java +++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java @@ -40,7 +40,6 @@ import org.apache.hadoop.hbase.client.Put; 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 HBaseTestCase { 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 HBaseTestCase { 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 HBaseTestCase { 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);