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-1095
Date Tue, 14 Jul 2015 10:28:31 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1095 2df9101e3 -> cf7ccc153


# ignite-1095


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

Branch: refs/heads/ignite-1095
Commit: cf7ccc1537f88c2f196f814c451cc74b1dd7058a
Parents: 2df9101
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Jul 14 13:28:21 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Jul 14 13:28:21 2015 +0300

----------------------------------------------------------------------
 .../distributed/dht/atomic/GridDhtAtomicCache.java      |  4 ++--
 .../dht/atomic/GridNearAtomicUpdateFuture.java          | 12 ++++++++++--
 ...GridCacheAtomicInvalidPartitionHandlingSelfTest.java |  2 +-
 3 files changed, 13 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cf7ccc15/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 1670994..96e6edc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -142,7 +142,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
                 }
 
                 // Request should be for primary keys only in PRIMARY ordering mode.
-                assert req.hasPrimary();
+                assert req.hasPrimary() : req;
 
                 if (req.writeSynchronizationMode() != FULL_ASYNC)
                     sendNearUpdateReply(res.nodeId(), res);
@@ -2158,7 +2158,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
      */
     private void unlockEntries(Collection<GridDhtCacheEntry> locked, AffinityTopologyVersion
topVer) {
         // Process deleted entries before locks release.
-        assert ctx.deferredDelete();
+        assert ctx.deferredDelete() : this;
 
         // Entries to skip eviction manager notification for.
         // Enqueue entries while holding locks.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cf7ccc15/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
index cb1d16f..f952ddf 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
@@ -446,6 +446,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
 
         if (err != null && X.hasCause(err, CachePartialUpdateCheckedException.class)
&&
             X.hasCause(err, ClusterTopologyCheckedException.class) &&
+            storeFuture() &&
             remapCnt.decrementAndGet() > 0) {
 
             CachePartialUpdateCheckedException cause = X.cause(err, CachePartialUpdateCheckedException.class);
@@ -648,6 +649,13 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
     }
 
     /**
+     * @return {@code True} future is stored by {@link GridCacheMvccManager#addAtomicFuture}.
+     */
+    private boolean storeFuture() {
+        return cctx.config().getAtomicWriteOrderMode() == CLOCK || syncMode != FULL_ASYNC;
+    }
+
+    /**
      * @param topVer Topology version.
      * @param remapKeys Keys to remap or {@code null} to map all keys.
      * @param remap Flag indicating if this is partial remap for this future.
@@ -673,7 +681,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
             // Assign future version in topology read lock before first exception may be
thrown.
             futVer = cctx.versions().next(topVer);
 
-        if (!remap && (cctx.config().getAtomicWriteOrderMode() == CLOCK || syncMode
!= FULL_ASYNC))
+        if (!remap && storeFuture())
             cctx.mvcc().addAtomicFuture(version(), this);
 
         CacheConfiguration ccfg = cctx.config();
@@ -1067,7 +1075,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
                 new CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse>()
{
                     @Override public void apply(GridNearAtomicUpdateRequest req,
                         GridNearAtomicUpdateResponse res) {
-                        assert res.futureVersion().equals(futVer);
+                        assert res.futureVersion().equals(futVer) : futVer;
 
                         onResult(res.nodeId(), res);
                     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cf7ccc15/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
index 8e69853..d3bcf67 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
@@ -269,7 +269,7 @@ public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends GridCommonA
 
                     return null;
                 }
-            }, 4);
+            }, 4, "putAll-thread");
 
             Random rnd = new Random();
 


Mime
View raw message