ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: # ignite-742-debug
Date Tue, 14 Apr 2015 11:28:06 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-742-debug 2cb87654e -> 6bfb89afc


# ignite-742-debug


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

Branch: refs/heads/ignite-742-debug
Commit: 6bfb89afcffbbca30994c6a03dc00ecc32d17dc8
Parents: 2cb8765
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Apr 14 14:27:32 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Apr 14 14:27:32 2015 +0300

----------------------------------------------------------------------
 .../cache/distributed/near/GridNearGetFuture.java       | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6bfb89af/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
index 3488665..889d5f8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
@@ -208,7 +208,7 @@ public final class GridNearGetFuture<K, V> extends GridCompoundIdentityFuture<Ma
                 MiniFuture f = (MiniFuture)fut;
 
                 if (f.node().id().equals(nodeId)) {
-                    f.onResult(new ClusterTopologyCheckedException("Remote node left grid
(will retry): " + nodeId));
+                    f.onNodeLeft(new ClusterTopologyCheckedException("Remote node left grid
(will retry): " + nodeId));
 
                     return true;
                 }
@@ -387,7 +387,7 @@ public final class GridNearGetFuture<K, V> extends GridCompoundIdentityFuture<Ma
                 catch (IgniteCheckedException e) {
                     // Fail the whole thing.
                     if (e instanceof ClusterTopologyCheckedException)
-                        fut.onResult((ClusterTopologyCheckedException)e);
+                        fut.onNodeLeft((ClusterTopologyCheckedException)e);
                     else
                         fut.onResult(e);
                 }
@@ -673,6 +673,9 @@ public final class GridNearGetFuture<K, V> extends GridCompoundIdentityFuture<Ma
         /** Topology version on which this future was mapped. */
         private AffinityTopologyVersion topVer;
 
+        /** */
+        private AtomicBoolean remap = new AtomicBoolean();
+
         /**
          * @param node Node.
          * @param keys Keys.
@@ -726,7 +729,10 @@ public final class GridNearGetFuture<K, V> extends GridCompoundIdentityFuture<Ma
         /**
          * @param e Topology exception.
          */
-        void onResult(ClusterTopologyCheckedException e) {
+        void onNodeLeft(ClusterTopologyCheckedException e) {
+            if (!remap.compareAndSet(false, true))
+                return;
+
             if (log.isDebugEnabled())
                 log.debug("Remote node left grid while sending or waiting for reply (will
retry): " + this);
 


Mime
View raw message