ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [28/50] [abbrv] ignite git commit: ignite-split2 - minor
Date Mon, 15 Feb 2016 07:52:12 GMT
ignite-split2 - minor


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

Branch: refs/heads/ignite-1232
Commit: 5cf4edc3ecf48ae3bc1dbf95193dc7eeed4ecdd0
Parents: 196346f
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Tue Dec 15 05:03:55 2015 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Tue Dec 15 05:03:55 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/query/GridCacheTwoStepQuery.java    |  1 +
 .../processors/query/h2/opt/GridH2QueryContext.java      |  1 +
 .../processors/query/h2/opt/GridH2TreeIndex.java         | 11 +++++++----
 .../processors/query/IgniteSqlSplitterSelfTest.java      |  7 +++++--
 4 files changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5cf4edc3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheTwoStepQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheTwoStepQuery.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheTwoStepQuery.java
index 7d7715a..dfc84b8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheTwoStepQuery.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheTwoStepQuery.java
@@ -183,6 +183,7 @@ public class GridCacheTwoStepQuery {
         cp.rdc = rdc.copy(args);
         cp.skipMergeTbl = skipMergeTbl;
         cp.pageSize = pageSize;
+        cp.distributedJoins = distributedJoins;
 
         for (int i = 0; i < mapQrys.size(); i++)
             cp.mapQrys.add(mapQrys.get(i).copy(args));

http://git-wip-us.apache.org/repos/asf/ignite/blob/5cf4edc3/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2QueryContext.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2QueryContext.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2QueryContext.java
index c7d98c1..2c74f6d 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2QueryContext.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2QueryContext.java
@@ -324,6 +324,7 @@ public class GridH2QueryContext {
      public static void set(GridH2QueryContext x) {
          assert qctx.get() == null;
 
+         // We need MAP query context to be available to other threads to run distributed
joins.
          if (x.key.type == MAP && qctxs.putIfAbsent(x.key, x) != null)
              throw new IllegalStateException("Query context is already set.");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/5cf4edc3/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
index eed21c4..7c7f715 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
@@ -1415,6 +1415,7 @@ public class GridH2TreeIndex extends GridH2IndexBase implements Comparator<GridS
                                 if (req.bounds() != null)
                                     req = createRequest(qctx, req.batchLookupId());
 
+                                // Prefetch next page.
                                 send(singletonList(node), req);
                             }
                             else
@@ -1559,6 +1560,8 @@ public class GridH2TreeIndex extends GridH2IndexBase implements Comparator<GridS
          * @return Range.
          */
         public GridH2RowRange next(int maxRows) {
+            assert maxRows > 0 : maxRows;
+
             for (;;) {
                 if (curRange.hasNext()) {
                     // Here we are getting last rows from previously partially fetched range.
@@ -1602,12 +1605,12 @@ public class GridH2TreeIndex extends GridH2IndexBase implements Comparator<GridS
                 curRange = doFind0(t, first, true, last, filter);
 
                 if (!curRange.hasNext()) {
-                    // We have to return empty range.
-                    GridH2RowRange nextRange = new GridH2RowRange();
+                    // We have to return empty range here.
+                    GridH2RowRange emptyRange = new GridH2RowRange();
 
-                    nextRange.rangeId(curRangeId);
+                    emptyRange.rangeId(curRangeId);
 
-                    return nextRange;
+                    return emptyRange;
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5cf4edc3/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
index 506be06..942a95c 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
@@ -223,8 +223,11 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest
{
             doTestDistributedJoins(c, 30, 100, 1000, false);
             doTestDistributedJoins(c, 30, 100, 1000, true);
 
-            doTestDistributedJoins(c, 100, 2000, 10, false);
-            doTestDistributedJoins(c, 100, 2000, 10, true);
+            doTestDistributedJoins(c, 3, 10, 3, false);
+            doTestDistributedJoins(c, 3, 10, 3, true);
+
+            doTestDistributedJoins(c, 300, 2000, 5, false);
+            doTestDistributedJoins(c, 300, 2000, 5, true);
         }
         finally {
             c.destroy();


Mime
View raw message