ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [3/4] ignite git commit: ignite-4705
Date Tue, 07 Mar 2017 10:33:57 GMT
ignite-4705


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

Branch: refs/heads/ignite-4705-debug
Commit: 17cf3399ff39be57898bd893b758013ddb29bf3b
Parents: 441e61e
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Mar 7 11:19:06 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Mar 7 11:19:06 2017 +0300

----------------------------------------------------------------------
 .../cache/distributed/dht/atomic/GridDhtAtomicCache.java |  8 ++++++++
 .../dht/atomic/GridNearAtomicSingleUpdateFuture.java     |  6 +++---
 .../GridCacheAtomicInvalidPartitionHandlingSelfTest.java | 11 ++++++++++-
 3 files changed, 21 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/17cf3399/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 30076f2..de1c290 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
@@ -648,6 +648,14 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
             true,
             false).get();
 
+        if (res == null) {
+            TestDebugLog.addEntryMessage(key, val, "null res");
+
+            TestDebugLog.printKeyMessages("test_debug.txt", key);
+
+            System.exit(33);
+        }
+
         assert res != null;
 
         return res;

http://git-wip-us.apache.org/repos/asf/ignite/blob/17cf3399/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
index 604b1ff..a113b27 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
@@ -139,12 +139,12 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
 
         GridNearAtomicCheckUpdateRequest checkReq = null;
 
+        boolean rcvAll = false;
+
         synchronized (mux) {
             if (reqState == null)
                 return false;
 
-            boolean rcvAll = false;
-
             if (reqState.req.nodeId.equals(nodeId)) {
                 GridNearAtomicAbstractUpdateRequest req = reqState.processPrimaryResponse(nodeId);
 
@@ -182,7 +182,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
 
         if (checkReq != null)
             sendCheckUpdateRequest(checkReq);
-        else
+        else if (rcvAll)
             finishUpdateFuture(opRes0, err0, remapTopVer0);
 
         return false;

http://git-wip-us.apache.org/repos/asf/ignite/blob/17cf3399/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 3fd4dd8..e144972 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
@@ -244,6 +244,9 @@ public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends GridCommonA
         this.writeSync = writeSync;
         this.memMode = memMode;
 
+        if (writeSync != FULL_SYNC)
+            return;
+
         final int gridCnt = 6;
 
         startGrids(gridCnt);
@@ -323,12 +326,16 @@ public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends
GridCommonA
                         try {
                             int cnt = rnd.nextInt(5);
 
-                            if (cnt < 2) {
+                            if (true || cnt < 2) {
                                 int key = rnd.nextInt(range);
 
                                 int val = rnd.nextInt();
 
+                                TestDebugLog.addEntryMessage(key, val, "start-put");
+
                                 cache.put(key, val);
+
+                                TestDebugLog.addEntryMessage(key, val, "put-done");
                             }
                             else {
                                 Map<Integer, Integer> upd = new TreeMap<>();
@@ -367,6 +374,8 @@ public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends GridCommonA
 
             fut.get();
 
+            TestDebugLog.clear();
+
             for (int k = 0; k < range; k++) {
                 Collection<ClusterNode> affNodes = affinity(cache).mapKeyToPrimaryAndBackups(k);
 


Mime
View raw message