ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [34/50] ignite git commit: Almost done.
Date Mon, 14 Aug 2017 10:30:44 GMT
Almost done.


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

Branch: refs/heads/ignite-5991-6019
Commit: 6984d0d39049ff5727a4fb0ea64ca85c6d0590a0
Parents: 131087a
Author: devozerov <vozerov@gridgain.com>
Authored: Mon Aug 14 11:31:35 2017 +0300
Committer: devozerov <vozerov@gridgain.com>
Committed: Mon Aug 14 11:31:35 2017 +0300

----------------------------------------------------------------------
 .../query/h2/twostep/GridMapQueryExecutor.java           |  6 +++---
 .../query/h2/twostep/lazy/MapQueryLazyWorker.java        | 11 ++++++++++-
 2 files changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6984d0d3/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
index 9362ab8..8c418ab 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
@@ -224,7 +224,7 @@ public class GridMapQueryExecutor {
      * @return Results for node.
      */
     private MapNodeResults resultsForNode(UUID nodeId) {
-        MapNodeResults nodeRess = qryRess.get(nodeId);
+        MapNodeResults nodeRess =  qryRess.get(nodeId);
 
         if (nodeRess == null) {
             nodeRess = new MapNodeResults(nodeId);
@@ -536,7 +536,7 @@ public class GridMapQueryExecutor {
         if (lazy && MapQueryLazyWorker.currentWorker() == null) {
             // Lazy queries must be re-submitted to dedicated workers.
             MapQueryLazyWorkerKey key = new MapQueryLazyWorkerKey(node.id(), reqId, segmentId);
-            MapQueryLazyWorker worker = new MapQueryLazyWorker(ctx.igniteInstanceName(),
key, log);
+            MapQueryLazyWorker worker = new MapQueryLazyWorker(ctx.igniteInstanceName(),
key, log, this);
 
             worker.submit(new Runnable() {
                 @Override public void run() {
@@ -867,7 +867,7 @@ public class GridMapQueryExecutor {
     /**
      * Unregister lazy worker if needed (i.e. if we are currently in laze worker thread).
      */
-    private void unregisterLazyWorkerIfNeeded() {
+    public void unregisterLazyWorkerIfNeeded() {
         MapQueryLazyWorker worker = MapQueryLazyWorker.currentWorker();
 
         if (worker != null) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/6984d0d3/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/lazy/MapQueryLazyWorker.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/lazy/MapQueryLazyWorker.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/lazy/MapQueryLazyWorker.java
index 3d68831..0b9297f 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/lazy/MapQueryLazyWorker.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/lazy/MapQueryLazyWorker.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.query.h2.twostep.lazy;
 
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.internal.IgniteInterruptedCheckedException;
+import org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor;
 import org.apache.ignite.internal.util.worker.GridWorker;
 import org.jetbrains.annotations.Nullable;
 
@@ -38,17 +39,23 @@ public class MapQueryLazyWorker extends GridWorker {
     /** Key. */
     private final MapQueryLazyWorkerKey key;
 
+    /** Map query executor. */
+    private final GridMapQueryExecutor exec;
+
     /**
      * Constructor.
      *
      * @param instanceName Instance name.
      * @param key Lazy worker key.
      * @param log Logger.
+     * @param exec Map query executor.
      */
-    public MapQueryLazyWorker(@Nullable String instanceName, MapQueryLazyWorkerKey key, IgniteLogger
log) {
+    public MapQueryLazyWorker(@Nullable String instanceName, MapQueryLazyWorkerKey key, IgniteLogger
log,
+        GridMapQueryExecutor exec) {
         super(instanceName, workerName(key), log);
 
         this.key = key;
+        this.exec = exec;
     }
 
     /** {@inheritDoc} */
@@ -65,6 +72,8 @@ public class MapQueryLazyWorker extends GridWorker {
         }
         finally {
             LAZY_WORKER.set(null);
+
+            exec.unregisterLazyWorkerIfNeeded();
         }
     }
 


Mime
View raw message