ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject incubator-ignite git commit: sprint-1 - Fixed assertion in affinity assignment cache.
Date Mon, 16 Feb 2015 00:33:46 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/sprint-1 4db446248 -> 494e6ddef


sprint-1 - Fixed assertion in affinity assignment cache.


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

Branch: refs/heads/sprint-1
Commit: 494e6ddef0fc89ae28904ac98d096ae4795ec8c4
Parents: 4db4462
Author: Alexey Goncharuk <agoncharuk@gridgain.com>
Authored: Sun Feb 15 16:33:41 2015 -0800
Committer: Alexey Goncharuk <agoncharuk@gridgain.com>
Committed: Sun Feb 15 16:33:41 2015 -0800

----------------------------------------------------------------------
 .../affinity/GridAffinityAssignmentCache.java          | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/494e6dde/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
index ae0b155..9c12a17 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
@@ -263,7 +263,7 @@ public class GridAffinityAssignmentCache {
         }
 
         GridFutureAdapter<Long> fut = F.addIfAbsent(readyFuts, topVer,
-            new AffinityReadyFuture(ctx.kernalContext()));
+            new AffinityReadyFuture(ctx.kernalContext(), topVer));
 
         aff = head.get();
 
@@ -421,6 +421,9 @@ public class GridAffinityAssignmentCache {
         /** */
         private static final long serialVersionUID = 0L;
 
+        /** */
+        private long reqTopVer;
+
         /**
          * Empty constructor required by {@link Externalizable}.
          */
@@ -431,18 +434,20 @@ public class GridAffinityAssignmentCache {
         /**
          * @param ctx Kernal context.
          */
-        private AffinityReadyFuture(GridKernalContext ctx) {
+        private AffinityReadyFuture(GridKernalContext ctx, long reqTopVer) {
             super(ctx);
+
+            this.reqTopVer = reqTopVer;
         }
 
         /** {@inheritDoc} */
         @Override public boolean onDone(Long res, @Nullable Throwable err) {
-            assert res != null;
+            assert res != null || err != null;
 
             boolean done = super.onDone(res, err);
 
             if (done)
-                readyFuts.remove(res, this);
+                readyFuts.remove(reqTopVer, this);
 
             return done;
         }


Mime
View raw message