ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [37/50] ignite git commit: Proper worker stop.
Date Mon, 14 Aug 2017 10:30:47 GMT
Proper worker stop.


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

Branch: refs/heads/ignite-5991-6019
Commit: a7d33d692cd045e2137ae6f8cf1b725be3a9aeb2
Parents: b0bef64
Author: devozerov <vozerov@gridgain.com>
Authored: Mon Aug 14 11:37:39 2017 +0300
Committer: devozerov <vozerov@gridgain.com>
Committed: Mon Aug 14 11:37:39 2017 +0300

----------------------------------------------------------------------
 .../processors/query/h2/twostep/MapQueryResult.java         | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a7d33d69/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/MapQueryResult.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/MapQueryResult.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/MapQueryResult.java
index a1f8a64..5751b27 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/MapQueryResult.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/MapQueryResult.java
@@ -175,7 +175,7 @@ class MapQueryResult {
      * @return {@code true} If there are no more rows available.
      */
     synchronized boolean fetchNextPage(List<Value[]> rows, int pageSize) {
-        assert lazyWorker == null || MapQueryLazyWorker.currentWorker() != null;
+        assert lazyWorker == null || lazyWorker == MapQueryLazyWorker.currentWorker();
 
         if (closed)
             return true;
@@ -274,8 +274,6 @@ class MapQueryResult {
                 }
             });
 
-            lazyWorker.stop();
-
             try {
                 // Wait for close synchronously to maintain consistent semantics.
                 closeFut.get();
@@ -287,11 +285,16 @@ class MapQueryResult {
             return;
         }
 
+        assert lazyWorker == null || lazyWorker == MapQueryLazyWorker.currentWorker();
+
         if (closed)
             return;
 
         closed = true;
 
         U.closeQuiet(rs);
+
+        if (lazyWorker != null)
+            lazyWorker.stop();
     }
 }


Mime
View raw message