phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamestay...@apache.org
Subject [2/2] git commit: PHOENIX-1314 Assertion tripped for skip scan with two unit tests (Rajeshbabu)
Date Sat, 11 Oct 2014 16:29:09 GMT
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/a11f0d9f
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/a11f0d9f
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/a11f0d9f

Branch: refs/heads/master
Commit: a11f0d9f2a0633a4285cb9b53921e5334da27787
Parents: a21a5e5
Author: James Taylor <jtaylor@salesforce.com>
Authored: Sat Oct 11 09:32:20 2014 -0700
Committer: James Taylor <jtaylor@salesforce.com>
Committed: Sat Oct 11 09:33:51 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/a11f0d9f/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/a11f0d9f/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/a11f0d9f/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/a11f0d9f/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);


Mime
View raw message