ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-1534 debug
Date Wed, 30 Sep 2015 13:26:49 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1534 e564e093e -> eb93fd164


ignite-1534 debug


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

Branch: refs/heads/ignite-1534
Commit: eb93fd16408dd8a2c3e2e96274c64591d487c379
Parents: e564e09
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Sep 30 16:26:32 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Sep 30 16:26:32 2015 +0300

----------------------------------------------------------------------
 .../discovery/GridDiscoveryManager.java         |  3 +++
 .../GridCachePartitionExchangeManager.java      | 10 +++++++-
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |  2 +-
 .../GridDhtPartitionsExchangeFuture.java        |  5 ++++
 .../distributed/CacheAffinityEarlyTest.java     | 13 ++++++++++
 .../IgniteCacheCreatePutMultiNodeSelfTest2.java | 25 ++++++++++++++++++--
 .../testsuites/IgniteCacheTestSuite4.java       | 11 +++++----
 7 files changed, 60 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/eb93fd16/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index f3e86ac..3ec7754 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -79,6 +79,7 @@ import org.apache.ignite.internal.processors.security.SecurityContext;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor;
 import org.apache.ignite.internal.util.F0;
 import org.apache.ignite.internal.util.GridBoundedConcurrentOrderedMap;
+import org.apache.ignite.internal.util.GridDebug;
 import org.apache.ignite.internal.util.GridSpinBusyLock;
 import org.apache.ignite.internal.util.future.GridFinishedFuture;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
@@ -507,6 +508,8 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi>
{
 
                 final AffinityTopologyVersion nextTopVer = new AffinityTopologyVersion(topVer,
minorTopVer);
 
+                GridDebug.debug("onDiscovery", nextTopVer, type, customMsg);
+
                 if (type == EVT_NODE_FAILED || type == EVT_NODE_LEFT) {
                     for (DiscoCache c : discoCacheHist.values())
                         c.updateAlives(node);

http://git-wip-us.apache.org/repos/asf/ignite/blob/eb93fd16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index 3e77e0d..8fa8be4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -60,6 +60,7 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.Gri
 import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteTxManager;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutObject;
+import org.apache.ignite.internal.util.GridDebug;
 import org.apache.ignite.internal.util.GridListSet;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
@@ -229,6 +230,8 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
                 }
 
                 if (exchId != null) {
+                    GridDebug.debug("add pending exchange", exchId, evt);
+
                     // Start exchange process.
                     pendingExchangeFuts.add(exchFut);
 
@@ -255,6 +258,8 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
                         }
                     });
                 }
+                else
+                    GridDebug.debug("skip exchange", evt);
             }
             finally {
                 leaveBusy();
@@ -1134,8 +1139,11 @@ public class GridCachePartitionExchangeManager<K, V> extends
GridCacheSharedMana
         void addFuture(GridDhtPartitionsExchangeFuture exchFut) {
             assert exchFut != null;
 
-            if (!exchFut.dummy() || (futQ.isEmpty() && !busy))
+            if (!exchFut.dummy() || (futQ.isEmpty() && !busy)) {
+                GridDebug.debug("offer future", exchFut.exchangeId());
+
                 futQ.offer(exchFut);
+            }
 
             if (log.isDebugEnabled())
                 log.debug("Added exchange future to exchange worker: " + exchFut);

http://git-wip-us.apache.org/repos/asf/ignite/blob/eb93fd16/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 fb2c5ad..343b38c 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
@@ -806,7 +806,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
 
             if (F.isEmpty(topNodes)) {
                 onDone(new ClusterTopologyServerNotFoundException("Failed to map keys for
cache (all partition nodes " +
-                    "left the grid)."));
+                    "left the grid) " + topVer));
 
                 return;
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/eb93fd16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index f6c33f2..0a63fe9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@ -61,6 +61,7 @@ import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutObject;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutObjectAdapter;
 import org.apache.ignite.internal.util.GridConcurrentHashSet;
+import org.apache.ignite.internal.util.GridDebug;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
@@ -503,6 +504,8 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
                 if (!F.isEmpty(reqs))
                     blockGateways();
 
+                GridDebug.debug("init exchange", exchId, oldest);
+
                 U.sleep();
 
                 startCaches();
@@ -1062,6 +1065,8 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
         cctx.exchange().onExchangeDone(this, err);
 
         if (super.onDone(res, err) && !dummy && !forcePreload) {
+            GridDebug.debug("exchange done", exchId, reqs);
+
             if (log.isDebugEnabled())
                 log.debug("Completed partition exchange [localNode=" + cctx.localNodeId()
+ ", exchange= " + this + ']');
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/eb93fd16/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java
index 932488e..7490924 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java
@@ -29,6 +29,7 @@ import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.util.GridDebug;
 import org.apache.ignite.marshaller.optimized.OptimizedMarshaller;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
@@ -88,6 +89,8 @@ public class CacheAffinityEarlyTest extends GridCommonAbstractTest {
                 log.info("Iteration: " + (i + 1) + '/' + iters);
 
                 doTest();
+
+                GridDebug.reset();
             }
             finally {
                 stopAllGrids(true);
@@ -136,6 +139,16 @@ public class CacheAffinityEarlyTest extends GridCommonAbstractTest {
                         log.error("Unexpected error: " + e, e);
 
                         failed.set(true);
+
+                        synchronized (getClass()) {
+                            e.printStackTrace();
+
+                            GridDebug.debug("Error: " + e);
+
+                            GridDebug.dumpWithReset();
+
+                            System.exit(11);
+                        }
                     }
                 }
             }, 1);

http://git-wip-us.apache.org/repos/asf/ignite/blob/eb93fd16/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest2.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest2.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest2.java
index 079f188..96a38ab 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest2.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest2.java
@@ -22,8 +22,10 @@ import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.CacheServerNotFoundException;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.util.GridDebug;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.marshaller.optimized.OptimizedMarshaller;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
@@ -78,6 +80,8 @@ public class IgniteCacheCreatePutMultiNodeSelfTest2 extends GridCommonAbstractTe
      * @throws Exception If failed.
      */
     public void testStartNodes() throws Exception {
+        GridDebug.reset();
+
         long stopTime = System.currentTimeMillis() + 3 * 60_000;
 
         try {
@@ -99,12 +103,29 @@ public class IgniteCacheCreatePutMultiNodeSelfTest2 extends GridCommonAbstractTe
 
                             IgniteCache cache = ignite.getOrCreateCache("cache1");
 
-                            for (int i = 0; i < 100; i++)
-                                cache.put(i, i);
+                            try {
+                                for (int i = 0; i < 100; i++)
+                                    cache.put(i, i);
+                            }
+                            catch (CacheServerNotFoundException e) {
+                                synchronized (getClass()) {
+                                    e.printStackTrace();
+
+                                    GridDebug.debug("Error: " + e);
+
+                                    GridDebug.dumpWithReset();
+
+                                    System.exit(11);
+                                }
+
+                                throw e;
+                            }
 
                             return null;
                         }
                     }, GRID_CNT, "start");
+
+                    GridDebug.reset();
                 }
                 finally {
                     stopAllGrids();

http://git-wip-us.apache.org/repos/asf/ignite/blob/eb93fd16/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
index fdab7d3..de519ff 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
@@ -138,20 +138,21 @@ public class IgniteCacheTestSuite4 extends TestSuite {
     public static TestSuite suite() throws Exception {
         TestSuite suite = new TestSuite("IgniteCache Test Suite part 4");
 
+        suite.addTestSuite(IgniteCacheCreatePutMultiNodeSelfTest2.class);
+        suite.addTestSuite(IgniteCacheCreatePutMultiNodeSelfTest2.class);
+        suite.addTestSuite(IgniteCacheCreatePutMultiNodeSelfTest2.class);
+        suite.addTestSuite(IgniteCacheCreatePutMultiNodeSelfTest2.class);
+        suite.addTestSuite(IgniteCacheCreatePutMultiNodeSelfTest2.class);
+
         suite.addTestSuite(CacheAffinityEarlyTest.class);
-        suite.addTestSuite(IgniteCacheCreatePutMultiNodeSelfTest.class);
         suite.addTestSuite(IgniteCacheCreatePutMultiNodeSelfTest2.class);
         suite.addTestSuite(CacheAffinityEarlyTest.class);
-        suite.addTestSuite(IgniteCacheCreatePutMultiNodeSelfTest.class);
         suite.addTestSuite(IgniteCacheCreatePutMultiNodeSelfTest2.class);
         suite.addTestSuite(CacheAffinityEarlyTest.class);
-        suite.addTestSuite(IgniteCacheCreatePutMultiNodeSelfTest.class);
         suite.addTestSuite(IgniteCacheCreatePutMultiNodeSelfTest2.class);
         suite.addTestSuite(CacheAffinityEarlyTest.class);
-        suite.addTestSuite(IgniteCacheCreatePutMultiNodeSelfTest.class);
         suite.addTestSuite(IgniteCacheCreatePutMultiNodeSelfTest2.class);
         suite.addTestSuite(CacheAffinityEarlyTest.class);
-        suite.addTestSuite(IgniteCacheCreatePutMultiNodeSelfTest.class);
         suite.addTestSuite(IgniteCacheCreatePutMultiNodeSelfTest2.class);
 
         return suite;


Mime
View raw message