Index: src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java (revision 1174515) +++ src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java (working copy) @@ -59,6 +59,12 @@ /** Row the query is on */ protected byte [] row; + /** Should we ignore KV's with a newer RWCC timestamp **/ + private boolean ignoreNewerKVs = false; + public void ignoreNewerKVs() { + this.ignoreNewerKVs = true; + } + /** * Constructs a ScanQueryMatcher for a Scan. * @param scan @@ -166,6 +172,12 @@ return columns.getNextRowOrNextColumn(bytes, offset, qualLength); } + // The compaction thread has no readPoint set. For other operations, we + // will ignore updates that are done after the read operation has started. + if (this.ignoreNewerKVs && + kv.getMemstoreTS() > ReadWriteConsistencyControl.getThreadReadPoint()) + return MatchCode.SKIP; + byte type = kv.getType(); if (isDelete(type)) { if (tr.withinOrAfterTimeRange(timestamp)) { Index: src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java (revision 1174515) +++ src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java (working copy) @@ -66,6 +66,7 @@ columns, store.ttl, store.comparator.getRawComparator(), store.minVersions, store.versionsToReturn(scan.getMaxVersions()), false); + matcher.ignoreNewerKVs(); this.isGet = scan.isGetScan(); // pass columns = try to filter out unnecessary ScanFiles