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:41 UTC

[phoenix] branch 4.x 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 4.x
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/4.x by this push:
     new 068d94e  PHOENIX-5669 : Remove hack for PHOENIX-3121
068d94e is described below

commit 068d94e41545e26532f5bd3a76ddda3f7cf335d5
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 9bbd21c..2b10780 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 819ccbd..a9d5eb0 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
@@ -1934,10 +1934,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