From 84e45319382b6dd7a8182332298005303dfbfc8d Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Wed, 19 Jun 2013 04:58:26 +0000 Subject: [PATCH] HBASE-801 Avoid unnecessary lazy seek git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1494458 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/hadoop/hbase/regionserver/KeyValueHeap.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/KeyValueHeap.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/KeyValueHeap.java index 9d2aceb9266..3a290be8720 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/KeyValueHeap.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/KeyValueHeap.java @@ -294,7 +294,8 @@ public class KeyValueHeap extends NonLazyKeyValueScanner } boolean seekResult; - if (isLazy) { + if (isLazy && heap.size() > 0) { + // If there is only one scanner left, we don't do lazy seek. seekResult = scanner.requestSeek(seekKey, forward, useBloom); } else { seekResult = NonLazyKeyValueScanner.doRealSeek(