HBASE-7740 Recheck matching row for joined scanners (Sergey)

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1441684 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2013-02-02 02:21:01 +00:00
parent 003a05896e
commit fd5a096d3e
1 changed files with 3 additions and 2 deletions

View File

@ -3676,10 +3676,11 @@ public class HRegion implements HeapSize { // , Writable{
if (this.joinedHeap != null) { if (this.joinedHeap != null) {
KeyValue nextJoinedKv = joinedHeap.peek(); KeyValue nextJoinedKv = joinedHeap.peek();
// If joinedHeap is pointing to some other row, try to seek to a correct one. // If joinedHeap is pointing to some other row, try to seek to a correct one.
// We don't need to recheck that row here - populateResult will take care of that.
boolean mayHaveData = boolean mayHaveData =
(nextJoinedKv != null && nextJoinedKv.matchingRow(currentRow, offset, length)) (nextJoinedKv != null && nextJoinedKv.matchingRow(currentRow, offset, length))
|| this.joinedHeap.seek(KeyValue.createFirstOnRow(currentRow, offset, length)); || (this.joinedHeap.seek(KeyValue.createFirstOnRow(currentRow, offset, length))
&& joinedHeap.peek() != null
&& joinedHeap.peek().matchingRow(currentRow, offset, length));
if (mayHaveData) { if (mayHaveData) {
joinedContinuationRow = current; joinedContinuationRow = current;
populateFromJoinedHeap(results, limit, metric); populateFromJoinedHeap(results, limit, metric);