ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [4/6] incubator-ignite git commit: #ignite-973 - fix for IGNITE-1041
Date Mon, 22 Jun 2015 06:48:01 GMT
#ignite-973 - fix for IGNITE-1041


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

Branch: refs/heads/ignite-sprint-6
Commit: ced62b8708952abfabc4926cfbb28c424d1ce651
Parents: de27ff1
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Mon Jun 22 09:35:43 2015 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Mon Jun 22 09:35:43 2015 +0300

----------------------------------------------------------------------
 .../processors/query/h2/IgniteH2Indexing.java   |  2 ++
 .../query/h2/twostep/GridMapQueryExecutor.java  | 23 ++++++++++----------
 2 files changed, 13 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ced62b87/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index c162ae6..06c0961 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -1354,6 +1354,8 @@ public class IgniteH2Indexing implements GridQueryIndexing {
         Schema rmv = schemas.remove(schema);
 
         if (rmv != null) {
+            mapQryExec.onCacheStop(ccfg.getName());
+
             try {
                 dropSchema(schema);
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ced62b87/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 ba95d43..0f38353 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
@@ -124,18 +124,6 @@ public class GridMapQueryExecutor {
             }
         }, EventType.EVT_NODE_FAILED, EventType.EVT_NODE_LEFT);
 
-        // Drop group reservations for dead caches.
-        ctx.event().addLocalEventListener(new GridLocalEventListener() {
-            @Override public void onEvent(Event evt) {
-                String cacheName = ((CacheEvent)evt).cacheName();
-
-                for (T2<String,AffinityTopologyVersion> grpKey : reservations.keySet())
{
-                    if (F.eq(grpKey.get1(), cacheName))
-                        reservations.remove(grpKey);
-                }
-            }
-        }, EventType.EVT_CACHE_STOPPED);
-
         ctx.io().addMessageListener(GridTopic.TOPIC_QUERY, new GridMessageListener() {
             @Override public void onMessage(UUID nodeId, Object msg) {
                 if (!busyLock.enterBusy())
@@ -599,6 +587,17 @@ public class GridMapQueryExecutor {
     }
 
     /**
+     * @param cacheName Cache name.
+     */
+    public void onCacheStop(String cacheName) {
+        // Drop group reservations.
+        for (T2<String,AffinityTopologyVersion> grpKey : reservations.keySet()) {
+            if (F.eq(grpKey.get1(), cacheName))
+                reservations.remove(grpKey);
+        }
+    }
+
+    /**
      *
      */
     private class QueryResults {


Mime
View raw message