ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntikho...@apache.org
Subject [25/50] incubator-ignite git commit: master - minor refactoring
Date Tue, 11 Aug 2015 08:46:55 GMT
master - minor refactoring


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

Branch: refs/heads/ignite-1108
Commit: b683b8f80b59696933d52ad2c79321b374e4e6b4
Parents: 246b94a
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Wed Aug 5 00:27:18 2015 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Wed Aug 5 00:27:18 2015 +0300

----------------------------------------------------------------------
 .../query/h2/twostep/GridMergeIndexUnsorted.java       |  8 +-------
 .../processors/query/h2/twostep/GridMergeTable.java    | 13 +++++++------
 2 files changed, 8 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b683b8f8/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
index 276d25b..61aaa80 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
@@ -75,13 +75,7 @@ public class GridMergeIndexUnsorted extends GridMergeIndex {
                         if (page != null)
                             break;
 
-                        UUID nodeId = ((GridMergeTable)table).checkSourceNodesAlive();
-
-                        if (nodeId != null) {
-                            fail(nodeId);
-
-                            assert !queue.isEmpty();
-                        }
+                        ((GridMergeTable)table).checkSourceNodesAlive();
                     }
 
                     if (page.isLast())

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b683b8f8/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
index fd9eec3..0b335d3 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
@@ -54,15 +54,16 @@ public class GridMergeTable extends TableBase {
     }
 
     /**
-     * @return Failed node or {@code null} if all alive.
+     * Fails merge table if any source node is left.
      */
-    public UUID checkSourceNodesAlive() {
+    public void checkSourceNodesAlive() {
         for (UUID nodeId : idx.sources()) {
-            if (!ctx.discovery().alive(nodeId))
-                return nodeId;
-        }
+            if (!ctx.discovery().alive(nodeId)) {
+                idx.fail(nodeId);
 
-        return null;
+                return;
+            }
+        }
     }
 
     /** {@inheritDoc} */


Mime
View raw message