You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by vj...@apache.org on 2021/03/12 14:34:18 UTC
[phoenix] branch 4.16 updated: PHOENIX-6385 : For non-small Scan,
not to use Scan#setSmall for HBase 2.x versions (#1167)
This is an automated email from the ASF dual-hosted git repository.
vjasani pushed a commit to branch 4.16
in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/4.16 by this push:
new 010ca2b PHOENIX-6385 : For non-small Scan, not to use Scan#setSmall for HBase 2.x versions (#1167)
010ca2b is described below
commit 010ca2b77f5cb8ba8bb3e6fc1e04d43e8a0c051f
Author: Viraj Jasani <vj...@apache.org>
AuthorDate: Fri Mar 12 18:55:53 2021 +0530
PHOENIX-6385 : For non-small Scan, not to use Scan#setSmall for HBase 2.x versions (#1167)
Signed-off-by: Anoop Sam John <an...@apache.org>
---
phoenix-core/src/main/java/org/apache/phoenix/util/ScanUtil.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/util/ScanUtil.java b/phoenix-core/src/main/java/org/apache/phoenix/util/ScanUtil.java
index f8df8f9..d0b50bc 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/util/ScanUtil.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/util/ScanUtil.java
@@ -179,12 +179,19 @@ public class ScanUtil {
newScan.setFamilyMap(clonedMap);
// Carry over the reversed attribute
newScan.setReversed(scan.isReversed());
- newScan.setSmall(scan.isSmall());
+ if (scan.isSmall()) {
+ // HBASE-25644 : Only if Scan#setSmall(boolean) is called with
+ // true, readType should be set PREAD. For non-small scan,
+ // setting setSmall(false) is redundant and degrades perf
+ // without HBASE-25644 fix.
+ newScan.setSmall(true);
+ }
return newScan;
} catch (IOException e) {
throw new RuntimeException(e);
}
}
+
/**
* Intersects the scan start/stop row with the startKey and stopKey
* @param scan