Index: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java =================================================================== --- hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java (revision 1531947) +++ hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java (working copy) @@ -678,7 +678,7 @@ this.lock.readLock().lock(); try { return Collections.singletonList( - new MemStoreScanner()); + new MemStoreScanner(MultiVersionConsistencyControl.getThreadReadPoint())); } finally { this.lock.readLock().unlock(); } @@ -730,6 +730,8 @@ // The allocator and snapshot allocator at the time of creating this scanner volatile MemStoreLAB allocatorAtCreation; volatile MemStoreLAB snapshotAllocatorAtCreation; + + private long readPoint; /* Some notes... @@ -752,9 +754,10 @@ the adds to kvset in the MemStoreScanner. */ - MemStoreScanner() { + MemStoreScanner(long readPoint) { super(); + this.readPoint = readPoint; kvsetAtCreation = kvset; snapshotAtCreation = snapshot; if (allocator != null) { @@ -768,13 +771,11 @@ } private KeyValue getNext(Iterator it) { - long readPoint = MultiVersionConsistencyControl.getThreadReadPoint(); - KeyValue v = null; try { while (it.hasNext()) { v = it.next(); - if (v.getMvccVersion() <= readPoint) { + if (v.getMvccVersion() <= this.readPoint) { return v; } }