You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ya...@apache.org on 2020/11/10 05:11:44 UTC
[phoenix] branch master updated: PHOENIX-5669 : Remove hack for
PHOENIX-3121
This is an automated email from the ASF dual-hosted git repository.
yanxinyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/master by this push:
new 28518ff PHOENIX-5669 : Remove hack for PHOENIX-3121
28518ff is described below
commit 28518ffdc19da594fbd1b1115446fb2750960774
Author: Viraj Jasani <vj...@apache.org>
AuthorDate: Tue Nov 3 18:26:24 2020 +0530
PHOENIX-5669 : Remove hack for PHOENIX-3121
Signed-off-by: Xinyi Yan <ya...@apache.org>
---
.../main/java/org/apache/phoenix/execute/BaseQueryPlan.java | 8 ++------
.../main/java/org/apache/phoenix/jdbc/PhoenixStatement.java | 11 +++++++----
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/execute/BaseQueryPlan.java b/phoenix-core/src/main/java/org/apache/phoenix/execute/BaseQueryPlan.java
index 13865ee..20f9ba1 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/execute/BaseQueryPlan.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/execute/BaseQueryPlan.java
@@ -268,12 +268,8 @@ public abstract class BaseQueryPlan implements QueryPlan {
if (OrderBy.REV_ROW_KEY_ORDER_BY.equals(orderBy)) {
ScanUtil.setReversed(scan);
- // Hack for working around PHOENIX-3121 and HBASE-16296.
- // TODO: remove once PHOENIX-3121 and/or HBASE-16296 are fixed.
- int scannerCacheSize = context.getStatement().getFetchSize();
- if (limit != null && limit % scannerCacheSize == 0) {
- scan.setCaching(scannerCacheSize + 1);
- }
+ // After HBASE-16296 is resolved, we no longer need to set
+ // scan caching
}
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixStatement.java b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixStatement.java
index 1990148..5c024e6 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixStatement.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixStatement.java
@@ -1976,10 +1976,13 @@ public class PhoenixStatement implements Statement, SQLCloseable {
@Override
public int getFetchSize() throws SQLException {
- if (fetchSize>0)
- return fetchSize;
- else
- return connection.getQueryServices().getProps().getInt(QueryServices.SCAN_CACHE_SIZE_ATTRIB, QueryServicesOptions.DEFAULT_SCAN_CACHE_SIZE);
+ if (fetchSize > 0) {
+ return fetchSize;
+ } else {
+ return connection.getQueryServices().getProps()
+ .getInt(QueryServices.SCAN_CACHE_SIZE_ATTRIB,
+ QueryServicesOptions.DEFAULT_SCAN_CACHE_SIZE);
+ }
}
@Override