You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ja...@apache.org on 2014/10/11 18:27:14 UTC

[2/2] git commit: PHOENIX-1314 Assertion tripped for skip scan with two unit tests (Rajeshbabu)

PHOENIX-1314 Assertion tripped for skip scan with two unit tests (Rajeshbabu)


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/ab8b17d7
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/ab8b17d7
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/ab8b17d7

Branch: refs/heads/4.0
Commit: ab8b17d793c9e477fa45b0eed709a35c7d5d68cb
Parents: ae02d1c
Author: James Taylor <jt...@salesforce.com>
Authored: Sat Oct 11 09:32:20 2014 -0700
Committer: James Taylor <jt...@salesforce.com>
Committed: Sat Oct 11 09:32:20 2014 -0700

----------------------------------------------------------------------
 .../src/it/java/org/apache/phoenix/end2end/DeleteIT.java         | 1 -
 .../it/java/org/apache/phoenix/end2end/index/MutableIndexIT.java | 1 -
 .../src/main/java/org/apache/phoenix/filter/SkipScanFilter.java  | 4 ++--
 .../main/java/org/apache/phoenix/index/PhoenixIndexBuilder.java  | 1 +
 4 files changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/ab8b17d7/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
index ae66379..677fb53 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
@@ -260,7 +260,6 @@ public class DeleteIT extends BaseHBaseManagedTimeIT {
         testDeleteAllFromTableWithIndex(true, false);
     }
     
-    //@Ignore // TODO: JT to look at: SkipScanFilter:151 assert for skip_hint > current_key is failing 
     @Test
     public void testDeleteAllFromTableWithIndexNoAutoCommitNoSalting() throws SQLException {
         testDeleteAllFromTableWithIndex(false,false);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ab8b17d7/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexIT.java
index 8c9256d..75b6c4e 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexIT.java
@@ -241,7 +241,6 @@ public class MutableIndexIT extends BaseMutableIndexIT {
     }
 
     @Test
-    //@Ignore // TODO: ask Rajeshbabu to look at: SkipScanFilter:151 assert for skip_hint > current_key is failing 
     public void testCoveredColumnUpdatesWithLocalIndex() throws Exception {
         testCoveredColumnUpdates(true);
     }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ab8b17d7/phoenix-core/src/main/java/org/apache/phoenix/filter/SkipScanFilter.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/filter/SkipScanFilter.java b/phoenix-core/src/main/java/org/apache/phoenix/filter/SkipScanFilter.java
index 9e1f55a..33a323e 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/filter/SkipScanFilter.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/filter/SkipScanFilter.java
@@ -152,8 +152,8 @@ public class SkipScanFilter extends FilterBase implements Writable {
         // Tests failing with this assert include: 
         // DeleteIT.testDeleteAllFromTableWithIndexNoAutoCommitNoSalting()
         // MutableIndexIT.testCoveredColumnUpdatesWithLocalIndex()
-//        assert previousCellHint == null || KeyValue.COMPARATOR.compare(nextCellHint, previousCellHint) > 0
-//                : "next hint must come after previous hint (prev=" + previousCellHint + ", next=" + nextCellHint + ", kv=" + kv + ")";
+        assert previousCellHint == null || KeyValue.COMPARATOR.compare(nextCellHint, previousCellHint) > 0
+                : "next hint must come after previous hint (prev=" + previousCellHint + ", next=" + nextCellHint + ", kv=" + kv + ")";
     }
     
     @Override

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ab8b17d7/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexBuilder.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexBuilder.java b/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexBuilder.java
index 6897106..46d09d6 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexBuilder.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexBuilder.java
@@ -71,6 +71,7 @@ public class PhoenixIndexBuilder extends CoveredColumnsIndexBuilder {
         if (maintainers.isEmpty()) return;
         Scan scan = IndexManagementUtil.newLocalStateScan(new ArrayList<IndexMaintainer>(maintainers.values()));
         ScanRanges scanRanges = ScanRanges.create(SchemaUtil.VAR_BINARY_SCHEMA, Collections.singletonList(keys), ScanUtil.SINGLE_COLUMN_SLOT_SPAN);
+        scanRanges.initializeScan(scan);
         scan.setFilter(scanRanges.getSkipScanFilter());
         HRegion region = this.env.getRegion();
         RegionScanner scanner = region.getScanner(scan);