You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/08/11 19:35:54 UTC

[01/17] incubator-ignite git commit: ignite-1189: clearing grid information on stop even when grid's state is not STARTED

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1175 171caab0a -> 5479e9128 (forced update)


ignite-1189: clearing grid information on stop even when grid's state is not STARTED


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

Branch: refs/heads/ignite-1175
Commit: ac6d75dc55eab0ce909c972a1124bf5fb42a5e3d
Parents: aec9764
Author: Denis Magda <dm...@gridgain.com>
Authored: Mon Aug 3 12:44:45 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Mon Aug 3 12:44:45 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/internal/IgnitionEx.java  | 21 +++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ac6d75dc/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index 5cbe377..d355085 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -261,8 +261,11 @@ public class IgnitionEx {
     public static boolean stop(@Nullable String name, boolean cancel) {
         IgniteNamedInstance grid = name != null ? grids.get(name) : dfltGrid;
 
-        if (grid != null && grid.state() == STARTED) {
-            grid.stop(cancel);
+        if (grid != null) {
+            IgniteState state = grid.state();
+
+            if (state == STARTED)
+                grid.stop(cancel);
 
             boolean fireEvt;
 
@@ -277,10 +280,18 @@ public class IgnitionEx {
                 }
             }
 
-            if (fireEvt)
-                notifyStateChange(grid.getName(), grid.state());
+            if (state == STARTED) {
+                if (fireEvt)
+                    notifyStateChange(grid.getName(), grid.state());
 
-            return true;
+                return true;
+            }
+            else {
+                U.warn(null, "Ignoring stopping grid instance (has not been in STARTED state): [grid=" + name +
+                    ", state=" + state + ']');
+
+                return false;
+            }
         }
 
         // We don't have log at this point...


[11/17] incubator-ignite git commit: Merge branch 'ignite-1189'

Posted by sb...@apache.org.
Merge branch 'ignite-1189'


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

Branch: refs/heads/ignite-1175
Commit: cd844a7f959c79e3b5e9364ab9993f1c3d4fc91e
Parents: d9acbd1 e42f954
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Aug 10 13:34:03 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Aug 10 13:34:03 2015 +0300

----------------------------------------------------------------------
 .../configuration/IgniteConfiguration.java      |  1 -
 .../dht/atomic/GridDhtAtomicCache.java          | 36 ++++++++++++++------
 2 files changed, 26 insertions(+), 11 deletions(-)
----------------------------------------------------------------------



[05/17] incubator-ignite git commit: ignite-1189: 3 reproducing deadlock

Posted by sb...@apache.org.
ignite-1189: 3 reproducing deadlock


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

Branch: refs/heads/ignite-1175
Commit: 28c9977bb8344f2d73c65d45656b673a9a4c634b
Parents: 3ce3c8b
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Aug 4 11:41:48 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Aug 4 11:41:48 2015 +0300

----------------------------------------------------------------------
 .../cache/distributed/dht/atomic/GridDhtAtomicCache.java        | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/28c9977b/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 d6163c2..4d73fb2 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
@@ -1153,8 +1153,9 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
                 e.printStackTrace();
             }
             catch (Exception e) {
-                if (X.hasCause(e, InterruptedException.class))
-                    U.error(log, "FUCK Interrupted", e);
+                U.error(log, "FUCK ERROR", e);
+
+                throw e;
             }
             finally {
                 if (locked != null)


[15/17] incubator-ignite git commit: Merge remote-tracking branch 'origin/master'

Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/master'


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

Branch: refs/heads/ignite-1175
Commit: 19fb305d5ceff430911d8dc25685686f6446ea21
Parents: fbda19d 0798e6f
Author: Anton Vinogradov <vi...@gmail.com>
Authored: Mon Aug 10 16:12:53 2015 +0300
Committer: Anton Vinogradov <vi...@gmail.com>
Committed: Mon Aug 10 16:12:53 2015 +0300

----------------------------------------------------------------------
 .../cache/GridCachePartitionExchangeManager.java    | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------



[14/17] incubator-ignite git commit: ignite-1222

Posted by sb...@apache.org.
ignite-1222


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

Branch: refs/heads/ignite-1175
Commit: fbda19d4b530051f0ab6784379afe66be7d44c76
Parents: cd844a7
Author: Anton Vinogradov <vi...@gmail.com>
Authored: Mon Aug 10 16:11:46 2015 +0300
Committer: Anton Vinogradov <vi...@gmail.com>
Committed: Mon Aug 10 16:11:46 2015 +0300

----------------------------------------------------------------------
 .../cache/CacheStopAndDestroySelfTest.java      | 87 --------------------
 1 file changed, 87 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fbda19d4/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
index 803789e..17f0db7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
@@ -712,93 +712,6 @@ public class CacheStopAndDestroySelfTest extends GridCommonAbstractTest {
     }
 
     /**
-     * Tests concurrent close.
-     *
-     * @throws Exception If failed.
-     */
-    public void testConcurrentCloseSetWithTry() throws Exception {
-        final AtomicInteger a1 = new AtomicInteger();
-        final AtomicInteger a2 = new AtomicInteger();
-        final AtomicInteger a3 = new AtomicInteger();
-        final AtomicInteger a4 = new AtomicInteger();
-
-        Thread t1 = new Thread(new Runnable() {
-            @Override public void run() {
-                Thread.currentThread().setName("test-thread-1");
-
-                closeWithTry(a1, 0);
-            }
-        });
-        Thread t2 = new Thread(new Runnable() {
-            @Override public void run() {
-                Thread.currentThread().setName("test-thread-2");
-
-                closeWithTry(a2, 0);
-            }
-        });
-        Thread t3 = new Thread(new Runnable() {
-            @Override public void run() {
-                Thread.currentThread().setName("test-thread-3");
-
-                closeWithTry(a3, 2);
-            }
-        });
-        Thread t4 = new Thread(new Runnable() {
-            @Override public void run() {
-                Thread.currentThread().setName("test-thread-4");
-
-                closeWithTry(a4, 2);
-            }
-        });
-
-        IgniteCache<Object, Object> cache = grid(0).getOrCreateCache(getDhtConfig());
-
-        cache.close();
-
-        t1.start();
-        t2.start();
-        t3.start();
-        t4.start();
-
-        try {
-            U.sleep(1000);
-        }
-        finally {
-            stop = true;
-        }
-
-        t1.join();
-        t2.join();
-        t3.join();
-        t4.join();
-
-        assert a1.get() > 1;
-        assert a2.get() > 1;
-        assert a3.get() > 1;
-        assert a4.get() > 1;
-
-        checkUsageFails(cache);
-    }
-
-    /**
-     * @param a AtomicInteger.
-     * @param node Node.
-     */
-    public void closeWithTry(AtomicInteger a, int node) {
-        while (!stop) {
-            try (IgniteCache<String, String> cache = grid(node).getOrCreateCache(getDhtConfig())) {
-                a.incrementAndGet();
-
-                assert cache.get(KEY_VAL) == null || cache.get(KEY_VAL).equals(KEY_VAL);
-
-                cache.put(KEY_VAL, KEY_VAL);
-
-                assert cache.get(KEY_VAL).equals(KEY_VAL);
-            }
-        }
-    }
-
-    /**
      * Tests start -> destroy -> start -> close using CacheManager.
      */
     public void testTckStyleCreateDestroyClose() {


[16/17] incubator-ignite git commit: # Fixed potential NPE in GridCachePartitionExchangeManager.dumpPendingObjects

Posted by sb...@apache.org.
# Fixed potential NPE in GridCachePartitionExchangeManager.dumpPendingObjects


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

Branch: refs/heads/ignite-1175
Commit: ae11e9b5aa9af4d0d58e2a16dd3a3331969961df
Parents: 19fb305
Author: sboikov <sb...@gridgain.com>
Authored: Tue Aug 11 09:42:02 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Aug 11 09:42:43 2015 +0300

----------------------------------------------------------------------
 .../GridCachePartitionExchangeManager.java      | 32 ++++++++++++--------
 1 file changed, 20 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae11e9b5/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 cf49197..e00d3b7 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
@@ -984,25 +984,33 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
      *
      */
     public void dumpPendingObjects() {
-        U.warn(log, "Pending transactions:");
+        IgniteTxManager tm = cctx.tm();
 
-        for (IgniteInternalTx tx : cctx.tm().activeTransactions())
-            U.warn(log, ">>> " + tx);
+        if (tm != null) {
+            U.warn(log, "Pending transactions:");
 
-        U.warn(log, "Pending explicit locks:");
+            for (IgniteInternalTx tx : tm.activeTransactions())
+                U.warn(log, ">>> " + tx);
+        }
 
-        for (GridCacheExplicitLockSpan lockSpan : cctx.mvcc().activeExplicitLocks())
-            U.warn(log, ">>> " + lockSpan);
+        GridCacheMvccManager mvcc = cctx.mvcc();
 
-        U.warn(log, "Pending cache futures:");
+        if (mvcc != null) {
+            U.warn(log, "Pending explicit locks:");
 
-        for (GridCacheFuture<?> fut : cctx.mvcc().activeFutures())
-            U.warn(log, ">>> " + fut);
+            for (GridCacheExplicitLockSpan lockSpan : mvcc.activeExplicitLocks())
+                U.warn(log, ">>> " + lockSpan);
 
-        U.warn(log, "Pending atomic cache futures:");
+            U.warn(log, "Pending cache futures:");
 
-        for (GridCacheFuture<?> fut : cctx.mvcc().atomicFutures())
-            U.warn(log, ">>> " + fut);
+            for (GridCacheFuture<?> fut : mvcc.activeFutures())
+                U.warn(log, ">>> " + fut);
+
+            U.warn(log, "Pending atomic cache futures:");
+
+            for (GridCacheFuture<?> fut : mvcc.atomicFutures())
+                U.warn(log, ">>> " + fut);
+        }
     }
 
     /**


[17/17] incubator-ignite git commit: ignite-1175 Entries are not removed from GridDhtLocalPartition after IgniteCache.remove

Posted by sb...@apache.org.
ignite-1175 Entries are not removed from GridDhtLocalPartition after IgniteCache.remove


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

Branch: refs/heads/ignite-1175
Commit: 5479e9128e223797a99b68b80d202f2f7a82a333
Parents: ae11e9b
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Fri Aug 7 18:44:57 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Tue Aug 11 19:00:43 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheContext.java      |  5 +++--
 .../processors/cache/GridCacheMapEntry.java     |  4 +++-
 ...cheDhtLocalPartitionAfterRemoveSelfTest.java | 21 +++++++++++++-------
 .../cache/GridCacheAbstractFullApiSelfTest.java | 16 +++++++++++----
 ...heExpiredEntriesPreloadAbstractSelfTest.java |  3 ++-
 ...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 10 ++++++----
 .../testsuites/IgniteCacheTestSuite2.java       |  1 +
 7 files changed, 41 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5479e912/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
index 5f17746..6ac0bc1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
@@ -537,8 +537,9 @@ public class GridCacheContext<K, V> implements Externalizable {
      * @return {@code True} if entries should not be deleted from cache immediately.
      */
     public boolean deferredDelete(GridCacheAdapter<?, ?> cache) {
-        return cache.isDht() || cache.isDhtAtomic() || cache.isColocated() ||
-            (cache.isNear() && cache.configuration().getAtomicityMode() == ATOMIC);
+        return ((cache.isDht() || cache.isColocated()) &&
+            (cache.context().dr().receiveEnabled() || cache.context().store().isLocal())) ||
+            cache.isDhtAtomic() || (cache.isNear() && cache.configuration().getAtomicityMode() == ATOMIC);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5479e912/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index f85a18b..0995191 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -1230,7 +1230,9 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
         if (writeThrough)
             cctx.store().remove(tx, keyValue(false));
 
-        if (!cctx.deferredDelete()) {
+        if (cctx.deferredDelete() && !detached() && !isInternal())
+            cctx.onDeferredDelete(this, newVer);
+        else {
             boolean marked = false;
 
             synchronized (this) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5479e912/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java
index b04e41a..f04717d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java
@@ -27,6 +27,9 @@ import org.apache.ignite.testframework.junits.common.*;
  * Test for remove operation.
  */
 public class CacheDhtLocalPartitionAfterRemoveSelfTest extends GridCommonAbstractTest {
+    /** Grid count. */
+    private static final int GRID_CNT = 3;
+
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(gridName);
@@ -44,7 +47,7 @@ public class CacheDhtLocalPartitionAfterRemoveSelfTest extends GridCommonAbstrac
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
-        startGrids(1);
+        startGrids(GRID_CNT);
     }
 
     /** {@inheritDoc} */
@@ -66,15 +69,19 @@ public class CacheDhtLocalPartitionAfterRemoveSelfTest extends GridCommonAbstrac
 
         assertEquals(0, cache.size());
 
-        int size = 0;
+        for (int g = 0; g < GRID_CNT; g++) {
+            cache = grid(g).cache(null);
 
-        for (GridDhtLocalPartition p : dht(cache).topology().localPartitions()) {
-            int pSize = p.size();
+            int size = 0;
 
-            size += pSize;
-        }
+            for (GridDhtLocalPartition p : dht(cache).topology().localPartitions()) {
+                int pSize = p.size();
 
-        System.out.println("All size: " + size);
+                size += pSize;
+            }
+
+            assertEquals(0, size);
+        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5479e912/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index fb004bf..30060e9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@ -2318,8 +2318,12 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
                                 cctx.cache().peekEx(key);
 
                             if (grid(idx).affinity(null).mapKeyToPrimaryAndBackups(key).contains(grid(idx).localNode())) {
-                                assertNotNull(entry);
-                                assertTrue(entry.deleted());
+                                if (cctx.deferredDelete()) {
+                                    assertNotNull(entry);
+                                    assertTrue(entry.deleted());
+                                }
+                                else
+                                    assertNull(entry);
                             }
                             else
                                 assertNull(entry);
@@ -3394,8 +3398,12 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
         // Ensure that old TTL and expire time are not longer "visible".
         entry = internalCache.peekEx(key);
 
-        assertEquals(0, entry.ttl());
-        assertEquals(0, entry.expireTime());
+        if (internalCache.context().deferredDelete()) {
+            assertEquals(0, entry.ttl());
+            assertEquals(0, entry.expireTime());
+        }
+        else
+            assertNull(entry);
 
         // Ensure that next update will not pick old expire time.
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5479e912/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheExpiredEntriesPreloadAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheExpiredEntriesPreloadAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheExpiredEntriesPreloadAbstractSelfTest.java
index ccc9b64..d8ce9cf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheExpiredEntriesPreloadAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheExpiredEntriesPreloadAbstractSelfTest.java
@@ -105,7 +105,8 @@ public abstract class GridCacheExpiredEntriesPreloadAbstractSelfTest extends Gri
 
         Collection<Event> evts = g1.events().localQuery(F.<Event>alwaysTrue(), EVT_CACHE_REBALANCE_OBJECT_LOADED);
 
-        assertEquals("Expected all entries are preloaded.", KEYS_NUM, evts.size());
+        assertEquals("Expected all entries are preloaded.", cache1.context().deferredDelete() ? KEYS_NUM : 0,
+            evts.size());
 
         boolean rmv = GridTestUtils.waitForCondition(new PAX() {
             @Override public boolean applyx() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5479e912/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
index f30ea71..80a2f76 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
@@ -412,10 +412,12 @@ public class GridCacheNearOnlyMultiNodeFullApiSelfTest extends GridCachePartitio
 
             GridCacheEntryEx entry = dht.peekEx(key);
 
-            assert entry != null;
-
-            assertEquals(0, entry.ttl());
-            assertEquals(0, entry.expireTime());
+            if (dht.context().deferredDelete()) {
+                assertEquals(0, entry.ttl());
+                assertEquals(0, entry.expireTime());
+            }
+            else
+                assertNull(entry);
         }
 
         // Ensure that next update will not pick old expire time.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5479e912/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
index 67e46f0..2efdb82 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
@@ -98,6 +98,7 @@ public class IgniteCacheTestSuite2 extends TestSuite {
         suite.addTest(new TestSuite(GridCacheDhtPreloadPutGetSelfTest.class));
         suite.addTest(new TestSuite(GridCacheDhtPreloadDisabledSelfTest.class));
         suite.addTest(new TestSuite(GridCacheDhtPreloadMultiThreadedSelfTest.class));
+        suite.addTest(new TestSuite(CacheDhtLocalPartitionAfterRemoveSelfTest.class));
         suite.addTest(new TestSuite(GridCacheColocatedPreloadRestartSelfTest.class));
         suite.addTest(new TestSuite(GridCacheNearPreloadRestartSelfTest.class));
         suite.addTest(new TestSuite(GridCacheDhtPreloadStartStopSelfTest.class));


[12/17] incubator-ignite git commit: # Fixed potential NPE in GridCachePartitionExchangeManager.dumpDebugInfo

Posted by sb...@apache.org.
# Fixed potential NPE in GridCachePartitionExchangeManager.dumpDebugInfo


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

Branch: refs/heads/ignite-1175
Commit: bd770a54a554c8c22f36ea00f8c735218c29b330
Parents: d9acbd1
Author: sboikov <sb...@gridgain.com>
Authored: Mon Aug 10 16:08:10 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Aug 10 16:08:10 2015 +0300

----------------------------------------------------------------------
 .../cache/GridCachePartitionExchangeManager.java    | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bd770a54/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 c26f5c3..cf49197 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
@@ -962,15 +962,19 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
         for (GridDhtPartitionsExchangeFuture fut : pendingExchangeFuts)
             U.warn(log, ">>> " + fut);
 
-        U.warn(log, "Last 10 exchange futures (total: " + exchFuts.size() + "):");
+        ExchangeFutureSet exchFuts = this.exchFuts;
 
-        int cnt = 0;
+        if (exchFuts != null) {
+            U.warn(log, "Last 10 exchange futures (total: " + exchFuts.size() + "):");
 
-        for (GridDhtPartitionsExchangeFuture fut : exchFuts) {
-            U.warn(log, ">>> " + fut);
+            int cnt = 0;
+
+            for (GridDhtPartitionsExchangeFuture fut : exchFuts) {
+                U.warn(log, ">>> " + fut);
 
-            if (++cnt == 10)
-                break;
+                if (++cnt == 10)
+                    break;
+            }
         }
 
         dumpPendingObjects();


[04/17] incubator-ignite git commit: ignite-1189: 2 reproducing deadlock

Posted by sb...@apache.org.
ignite-1189: 2 reproducing deadlock


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

Branch: refs/heads/ignite-1175
Commit: 3ce3c8b71064ff4d8abd78cd95f4678cb7a74811
Parents: efa7e99
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Aug 4 10:33:57 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Aug 4 10:33:57 2015 +0300

----------------------------------------------------------------------
 .../dht/atomic/GridDhtAtomicCache.java          | 40 +++-----------------
 1 file changed, 5 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3ce3c8b7/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 18911fd..d6163c2 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
@@ -85,8 +85,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
     /** */
     private GridNearAtomicCache<K, V> near;
 
-    private ThreadLocal<List<GridDhtCacheEntry>> lockedEntries = new ThreadLocal<>();
-
     /**
      * Empty constructor required by {@link Externalizable}.
      */
@@ -992,20 +990,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
         final GridNearAtomicUpdateRequest req,
         final CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse> completionCb
     ) {
-        boolean printKeys = false;
-
-        if (lockedEntries.get() != null) {
-            for (GridDhtCacheEntry entry : lockedEntries.get())
-                U.error(log, "Locked entry [entry=" + entry + ']');
-
-            printKeys = true;
-        }
-
-        if (printKeys) {
-            for (KeyCacheObject obj : req.keys())
-                U.error(log, "Key requested: " + obj);
-        }
-
         IgniteInternalFuture<Object> forceFut = preldr.request(req.keys(), req.topologyVersion());
 
         if (forceFut.isDone())
@@ -1048,26 +1032,10 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
         IgniteCacheExpiryPolicy expiry = null;
 
         try {
-            boolean printKeys = false;
-
-            if (lockedEntries.get() != null) {
-                for (GridDhtCacheEntry entry : lockedEntries.get())
-                    U.error(log, "Locked entry (2) [entry=" + entry + ']');
-
-                printKeys = true;
-            }
-
-            if (printKeys) {
-                for (KeyCacheObject obj : keys)
-                    U.error(log, "Key requested: " + obj);
-            }
-
             // If batch store update is enabled, we need to lock all entries.
             // First, need to acquire locks on cache entries, then check filter.
             List<GridDhtCacheEntry> locked = lockEntries(keys, req.topologyVersion());
 
-            lockedEntries.set(locked);
-
             Collection<IgniteBiTuple<GridDhtCacheEntry, GridCacheVersion>> deleted = null;
 
             try {
@@ -1184,11 +1152,13 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
 
                 e.printStackTrace();
             }
+            catch (Exception e) {
+                if (X.hasCause(e, InterruptedException.class))
+                    U.error(log, "FUCK Interrupted", e);
+            }
             finally {
-                if (locked != null) {
-                    lockedEntries.set(null);
+                if (locked != null)
                     unlockEntries(locked, req.topologyVersion());
-                }
 
                 // Enqueue if necessary after locks release.
                 if (deleted != null) {


[03/17] incubator-ignite git commit: ignite-1189: reproducing deadlock

Posted by sb...@apache.org.
ignite-1189: reproducing deadlock


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

Branch: refs/heads/ignite-1175
Commit: efa7e99bbad76ce35a55e6ad9faa9aac8e57b5f4
Parents: 6b237e1
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Aug 4 09:12:12 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Aug 4 09:12:12 2015 +0300

----------------------------------------------------------------------
 .../dht/atomic/GridDhtAtomicCache.java          | 36 +++++++++++++++-
 .../IgniteCacheAtomicNodeRestartTest.java       | 43 ++++++++++++++++++++
 2 files changed, 78 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/efa7e99b/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 0a21979..18911fd 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
@@ -85,6 +85,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
     /** */
     private GridNearAtomicCache<K, V> near;
 
+    private ThreadLocal<List<GridDhtCacheEntry>> lockedEntries = new ThreadLocal<>();
+
     /**
      * Empty constructor required by {@link Externalizable}.
      */
@@ -990,6 +992,20 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
         final GridNearAtomicUpdateRequest req,
         final CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse> completionCb
     ) {
+        boolean printKeys = false;
+
+        if (lockedEntries.get() != null) {
+            for (GridDhtCacheEntry entry : lockedEntries.get())
+                U.error(log, "Locked entry [entry=" + entry + ']');
+
+            printKeys = true;
+        }
+
+        if (printKeys) {
+            for (KeyCacheObject obj : req.keys())
+                U.error(log, "Key requested: " + obj);
+        }
+
         IgniteInternalFuture<Object> forceFut = preldr.request(req.keys(), req.topologyVersion());
 
         if (forceFut.isDone())
@@ -1032,10 +1048,26 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
         IgniteCacheExpiryPolicy expiry = null;
 
         try {
+            boolean printKeys = false;
+
+            if (lockedEntries.get() != null) {
+                for (GridDhtCacheEntry entry : lockedEntries.get())
+                    U.error(log, "Locked entry (2) [entry=" + entry + ']');
+
+                printKeys = true;
+            }
+
+            if (printKeys) {
+                for (KeyCacheObject obj : keys)
+                    U.error(log, "Key requested: " + obj);
+            }
+
             // If batch store update is enabled, we need to lock all entries.
             // First, need to acquire locks on cache entries, then check filter.
             List<GridDhtCacheEntry> locked = lockEntries(keys, req.topologyVersion());
 
+            lockedEntries.set(locked);
+
             Collection<IgniteBiTuple<GridDhtCacheEntry, GridCacheVersion>> deleted = null;
 
             try {
@@ -1153,8 +1185,10 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
                 e.printStackTrace();
             }
             finally {
-                if (locked != null)
+                if (locked != null) {
+                    lockedEntries.set(null);
                     unlockEntries(locked, req.topologyVersion());
+                }
 
                 // Enqueue if necessary after locks release.
                 if (deleted != null) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/efa7e99b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
index fa8898f..70e6c4c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
@@ -31,7 +31,50 @@ public class IgniteCacheAtomicNodeRestartTest extends GridCachePartitionedNodeRe
         return ATOMIC;
     }
 
+    /** {@inheritDoc} */
     @Override public void testRestartWithPutTenNodesTwoBackups() throws Throwable {
+        super.testRestartWithPutTenNodesTwoBackups();
+    }
+
+    @Override public void testRestart() throws Exception {
+    }
+
+    @Override public void testRestartWithPutTwoNodesNoBackups() throws Throwable {
+    }
+
+    @Override public void testRestartWithPutTwoNodesOneBackup() throws Throwable {
+    }
+
+    @Override public void testRestartWithPutFourNodesNoBackups() throws Throwable {
+    }
+
+    @Override public void testRestartWithPutFourNodesOneBackups() throws Throwable {
+    }
+
+    @Override public void testRestartWithPutSixNodesTwoBackups() throws Throwable {
+    }
+
+    @Override public void testRestartWithPutEightNodesTwoBackups() throws Throwable {
+    }
+
+    @Override public void testRestartWithTxEightNodesTwoBackups() throws Throwable {
+    }
+
+    @Override public void testRestartWithTxFourNodesNoBackups() throws Throwable {
+    }
+
+    @Override public void testRestartWithTxFourNodesOneBackups() throws Throwable {
+    }
+
+    @Override public void testRestartWithTxSixNodesTwoBackups() throws Throwable {
+    }
+
+    @Override public void testRestartWithTxTenNodesTwoBackups() throws Throwable {
+    }
+
+    @Override public void testRestartWithTxTwoNodesNoBackups() throws Throwable {
+    }
 
+    @Override public void testRestartWithTxTwoNodesOneBackup() throws Throwable {
     }
 }


[13/17] incubator-ignite git commit: Merge remote-tracking branch 'origin/master'

Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/master'


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

Branch: refs/heads/ignite-1175
Commit: 0798e6f1764aaf3e8101383b7a8ac3d7ed9b9d2c
Parents: bd770a5 cd844a7
Author: sboikov <sb...@gridgain.com>
Authored: Mon Aug 10 16:08:49 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Aug 10 16:08:49 2015 +0300

----------------------------------------------------------------------
 .../configuration/IgniteConfiguration.java      |  1 -
 .../dht/atomic/GridDhtAtomicCache.java          | 36 ++++++++++++++------
 2 files changed, 26 insertions(+), 11 deletions(-)
----------------------------------------------------------------------



[07/17] incubator-ignite git commit: ignite-1189: fixing deadlock

Posted by sb...@apache.org.
ignite-1189: fixing deadlock


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

Branch: refs/heads/ignite-1175
Commit: 4d528becc1cd3db9d4d2d6db2053895043aa3918
Parents: 132562b
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Aug 4 13:04:35 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Aug 4 13:04:35 2015 +0300

----------------------------------------------------------------------
 .../dht/atomic/GridDhtAtomicCache.java          | 29 +++++++++++++-------
 1 file changed, 19 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4d528bec/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 cd6e28d..470efdd 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
@@ -1176,6 +1176,12 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
         }
         catch (Exception e) {
             U.error(log, "Unexpected exception during cache update", e);
+
+            res.addFailedKeys(keys, e);
+
+            completionCb.apply(req, res);
+
+            return;
         }
 
         if (remap) {
@@ -2167,19 +2173,22 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
         // Enqueue entries while holding locks.
         Collection<KeyCacheObject> skip = null;
 
-        for (GridCacheMapEntry entry : locked) {
-            if (entry != null && entry.deleted()) {
-                if (skip == null)
-                    skip = new HashSet<>(locked.size(), 1.0f);
+        try {
+            for (GridCacheMapEntry entry : locked) {
+                if (entry != null && entry.deleted()) {
+                    if (skip == null)
+                        skip = new HashSet<>(locked.size(), 1.0f);
 
-                skip.add(entry.key());
+                    skip.add(entry.key());
+                }
             }
         }
-
-        // Release locks.
-        for (GridCacheMapEntry entry : locked) {
-            if (entry != null)
-                UNSAFE.monitorExit(entry);
+        finally {
+            // Release locks.
+            for (GridCacheMapEntry entry : locked) {
+                if (entry != null)
+                    UNSAFE.monitorExit(entry);
+            }
         }
 
         // Try evict partitions.


[08/17] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-1189

Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/master' into ignite-1189


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

Branch: refs/heads/ignite-1175
Commit: d78e4c8eef921775d2d5d1fcd5adf151c3d46923
Parents: 4d528be b056a73
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Aug 4 13:32:45 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Aug 4 13:32:45 2015 +0300

----------------------------------------------------------------------
 .../ClientAbstractMultiNodeSelfTest.java        |   4 +-
 .../apache/ignite/IgniteSystemProperties.java   |   2 +-
 .../store/jdbc/CacheAbstractJdbcStore.java      |  21 +-
 .../apache/ignite/internal/IgniteKernal.java    |   2 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |  43 +-
 .../managers/communication/GridIoManager.java   | 188 +++++++-
 .../processors/cache/GridCacheMvccManager.java  |  73 +--
 .../processors/cache/GridCacheProcessor.java    |   2 +-
 .../processors/cache/GridCacheProxyImpl.java    |  42 +-
 .../processors/cache/GridCacheSwapManager.java  |   2 +-
 .../distributed/near/GridNearGetFuture.java     |  20 +-
 .../ignite/internal/util/IgniteUtils.java       |  16 +
 .../util/nio/GridCommunicationClient.java       |   5 +-
 .../util/nio/GridNioFinishedFuture.java         |  12 +
 .../ignite/internal/util/nio/GridNioFuture.java |  14 +
 .../internal/util/nio/GridNioFutureImpl.java    |  15 +
 .../util/nio/GridNioRecoveryDescriptor.java     |  13 +-
 .../ignite/internal/util/nio/GridNioServer.java |   5 +
 .../util/nio/GridNioSessionMetaKey.java         |   5 +-
 .../util/nio/GridShmemCommunicationClient.java  |   7 +-
 .../util/nio/GridTcpNioCommunicationClient.java |  14 +-
 .../communication/tcp/TcpCommunicationSpi.java  |  43 +-
 .../ignite/spi/discovery/tcp/ClientImpl.java    |   2 +-
 .../src/test/config/io-manager-benchmark.xml    |   3 +-
 .../GridJobMasterLeaveAwareSelfTest.java        |  10 +-
 .../IgniteClientReconnectAbstractTest.java      |   5 +-
 .../IgniteClientReconnectCacheTest.java         |   5 +-
 .../GridDeploymentMessageCountSelfTest.java     |   5 +-
 .../cache/CacheStopAndDestroySelfTest.java      |   8 +-
 .../GridCacheAtomicMessageCountSelfTest.java    |   6 +-
 .../processors/cache/GridCacheMvccSelfTest.java |   1 -
 ...ridCacheReplicatedSynchronousCommitTest.java |   5 +-
 .../IgniteCacheAbstractStopBusySelfTest.java    |   6 +-
 .../cache/IgniteCacheNearLockValueSelfTest.java |   6 +-
 ...eDynamicCacheStartNoExchangeTimeoutTest.java |   4 +-
 .../cache/IgniteTxReentryAbstractSelfTest.java  |   5 +-
 ...niteCacheClientNodeChangingTopologyTest.java |   6 +-
 ...teCacheClientNodePartitionsExchangeTest.java |   4 +-
 .../IgniteCacheNearOffheapGetSelfTest.java      | 131 ++++++
 ...xOriginatingNodeFailureAbstractSelfTest.java |   6 +-
 ...cOriginatingNodeFailureAbstractSelfTest.java |   6 +-
 .../GridCacheDhtPreloadMessageCountTest.java    |   5 +-
 ...ePrimaryNodeFailureRecoveryAbstractTest.java |   6 +-
 ...eAtomicInvalidPartitionHandlingSelfTest.java |   5 +-
 .../near/IgniteCacheNearTxRollbackTest.java     |   6 +-
 .../GridCacheReplicatedInvalidateSelfTest.java  |   6 +-
 ...CommunicationRecoveryAckClosureSelfTest.java | 464 +++++++++++++++++++
 .../testsuites/IgniteCacheTestSuite2.java       |   1 +
 .../IgniteSpiCommunicationSelfTestSuite.java    |   1 +
 .../ignite/util/TestTcpCommunicationSpi.java    |   6 +-
 ...CacheScanPartitionQueryFallbackSelfTest.java |  15 +-
 .../parser/dialect/OracleMetadataDialect.java   |   4 +-
 .../src/test/java/config/ignite-test-config.xml |  43 ++
 .../ignite/internal/GridFactorySelfTest.java    |   9 +
 .../visor/commands/kill/VisorKillCommand.scala  |   2 +-
 55 files changed, 1148 insertions(+), 197 deletions(-)
----------------------------------------------------------------------



[02/17] incubator-ignite git commit: ignite-1189: trying to reproduce failures

Posted by sb...@apache.org.
ignite-1189: trying to reproduce failures


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

Branch: refs/heads/ignite-1175
Commit: 6b237e119caad68474cc785c0373da8ce31011d8
Parents: ac6d75d
Author: Denis Magda <dm...@gridgain.com>
Authored: Mon Aug 3 14:45:40 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Mon Aug 3 14:45:40 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/internal/IgnitionEx.java  | 21 +++++---------------
 .../IgniteCacheAtomicNodeRestartTest.java       |  4 ++++
 2 files changed, 9 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6b237e11/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index d355085..5cbe377 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -261,11 +261,8 @@ public class IgnitionEx {
     public static boolean stop(@Nullable String name, boolean cancel) {
         IgniteNamedInstance grid = name != null ? grids.get(name) : dfltGrid;
 
-        if (grid != null) {
-            IgniteState state = grid.state();
-
-            if (state == STARTED)
-                grid.stop(cancel);
+        if (grid != null && grid.state() == STARTED) {
+            grid.stop(cancel);
 
             boolean fireEvt;
 
@@ -280,18 +277,10 @@ public class IgnitionEx {
                 }
             }
 
-            if (state == STARTED) {
-                if (fireEvt)
-                    notifyStateChange(grid.getName(), grid.state());
-
-                return true;
-            }
-            else {
-                U.warn(null, "Ignoring stopping grid instance (has not been in STARTED state): [grid=" + name +
-                    ", state=" + state + ']');
+            if (fireEvt)
+                notifyStateChange(grid.getName(), grid.state());
 
-                return false;
-            }
+            return true;
         }
 
         // We don't have log at this point...

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6b237e11/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
index 1c4e616..fa8898f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
@@ -30,4 +30,8 @@ public class IgniteCacheAtomicNodeRestartTest extends GridCachePartitionedNodeRe
     @Override protected CacheAtomicityMode atomicityMode() {
         return ATOMIC;
     }
+
+    @Override public void testRestartWithPutTenNodesTwoBackups() throws Throwable {
+
+    }
 }


[10/17] incubator-ignite git commit: IGNITE-1189 Removed unnecessary comment.

Posted by sb...@apache.org.
IGNITE-1189 Removed unnecessary comment.


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

Branch: refs/heads/ignite-1175
Commit: e42f954f043b6690dfcc10b7eb8817194eb898e2
Parents: 6770606
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Aug 10 13:33:28 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Aug 10 13:33:28 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/configuration/IgniteConfiguration.java   | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e42f954f/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
index e1aff25..546c382 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
@@ -194,7 +194,6 @@ public class IgniteConfiguration {
 
     /** Default failure detection timeout in millis. */
     @SuppressWarnings("UnnecessaryBoxing")
-//    public static final Long DFLT_FAILURE_DETECTION_TIMEOUT = new Long(10_000);
     public static final Long DFLT_FAILURE_DETECTION_TIMEOUT = new Long(10_000);
 
     /** Optional grid name. */


[06/17] incubator-ignite git commit: ignite-1189: 4 reproducing deadlock

Posted by sb...@apache.org.
ignite-1189: 4 reproducing deadlock


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

Branch: refs/heads/ignite-1175
Commit: 132562b431bc3250abe56ec48725c5ebe6083964
Parents: 28c9977
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Aug 4 12:26:00 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Aug 4 12:26:00 2015 +0300

----------------------------------------------------------------------
 .../dht/atomic/GridDhtAtomicCache.java          |  8 ++--
 .../IgniteCacheAtomicNodeRestartTest.java       | 45 ++++++++++++++++++++
 2 files changed, 48 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/132562b4/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 4d73fb2..cd6e28d 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
@@ -1152,11 +1152,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
 
                 e.printStackTrace();
             }
-            catch (Exception e) {
-                U.error(log, "FUCK ERROR", e);
-
-                throw e;
-            }
             finally {
                 if (locked != null)
                     unlockEntries(locked, req.topologyVersion());
@@ -1179,6 +1174,9 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
 
             remap = true;
         }
+        catch (Exception e) {
+            U.error(log, "Unexpected exception during cache update", e);
+        }
 
         if (remap) {
             assert dhtFut == null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/132562b4/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
index 70e6c4c..caee4d0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
@@ -36,7 +36,52 @@ public class IgniteCacheAtomicNodeRestartTest extends GridCachePartitionedNodeRe
         super.testRestartWithPutTenNodesTwoBackups();
     }
 
+    public void testRestartWithPutTenNodesTwoBackups2() throws Throwable {
+        super.testRestartWithPutTenNodesTwoBackups();
+    }
+    public void testRestartWithPutTenNodesTwoBackups3() throws Throwable {
+        super.testRestartWithPutTenNodesTwoBackups();
+    }
+    public void testRestartWithPutTenNodesTwoBackups4() throws Throwable {
+        super.testRestartWithPutTenNodesTwoBackups();
+    }
+    public void testRestartWithPutTenNodesTwoBackups5() throws Throwable {
+        super.testRestartWithPutTenNodesTwoBackups();
+    }
+    public void testRestartWithPutTenNodesTwoBackups6() throws Throwable {
+        super.testRestartWithPutTenNodesTwoBackups();
+    }
+    public void testRestartWithPutTenNodesTwoBackups7() throws Throwable {
+        super.testRestartWithPutTenNodesTwoBackups();
+    }
+    public void testRestartWithPutTenNodesTwoBackups8() throws Throwable {
+        super.testRestartWithPutTenNodesTwoBackups();
+    }
+    public void testRestartWithPutTenNodesTwoBackups9() throws Throwable {
+        super.testRestartWithPutTenNodesTwoBackups();
+    }
+    public void testRestartWithPutTenNodesTwoBackups10() throws Throwable {
+        super.testRestartWithPutTenNodesTwoBackups();
+    }
+    public void testRestartWithPutTenNodesTwoBackups11() throws Throwable {
+        super.testRestartWithPutTenNodesTwoBackups();
+    }
+    public void testRestartWithPutTenNodesTwoBackups12() throws Throwable {
+        super.testRestartWithPutTenNodesTwoBackups();
+    }
+    public void testRestartWithPutTenNodesTwoBackups13() throws Throwable {
+        super.testRestartWithPutTenNodesTwoBackups();
+    }
+    public void testRestartWithPutTenNodesTwoBackups14() throws Throwable {
+        super.testRestartWithPutTenNodesTwoBackups();
+    }
+
+    @Override protected long getTestTimeout() {
+        return Long.MAX_VALUE;
+    }
+
     @Override public void testRestart() throws Exception {
+
     }
 
     @Override public void testRestartWithPutTwoNodesNoBackups() throws Throwable {


[09/17] incubator-ignite git commit: ignite-1189: eventually fixed the deadlock

Posted by sb...@apache.org.
ignite-1189: eventually fixed the deadlock


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

Branch: refs/heads/ignite-1175
Commit: 67706063d2e8d8cc3ed8d55cdfffccc0a21005c6
Parents: d78e4c8
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Aug 4 13:34:19 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Aug 4 13:34:19 2015 +0300

----------------------------------------------------------------------
 .../dht/atomic/GridDhtAtomicCache.java          |  6 +-
 .../IgniteCacheAtomicNodeRestartTest.java       | 92 --------------------
 2 files changed, 5 insertions(+), 93 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/67706063/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 470efdd..14b4680 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
@@ -1175,6 +1175,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
             remap = true;
         }
         catch (Exception e) {
+            // At least RuntimeException can be thrown by the code above when GridCacheContext is cleaned and there is
+            // an attempt to use cleaned resources.
             U.error(log, "Unexpected exception during cache update", e);
 
             res.addFailedKeys(keys, e);
@@ -2184,7 +2186,9 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
             }
         }
         finally {
-            // Release locks.
+            // At least RuntimeException can be thrown by the code above when GridCacheContext is cleaned and there is
+            // an attempt to use cleaned resources.
+            // That's why releasing locks in the finally block..
             for (GridCacheMapEntry entry : locked) {
                 if (entry != null)
                     UNSAFE.monitorExit(entry);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/67706063/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
index caee4d0..1c4e616 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
@@ -30,96 +30,4 @@ public class IgniteCacheAtomicNodeRestartTest extends GridCachePartitionedNodeRe
     @Override protected CacheAtomicityMode atomicityMode() {
         return ATOMIC;
     }
-
-    /** {@inheritDoc} */
-    @Override public void testRestartWithPutTenNodesTwoBackups() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-
-    public void testRestartWithPutTenNodesTwoBackups2() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups3() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups4() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups5() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups6() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups7() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups8() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups9() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups10() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups11() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups12() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups13() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups14() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-
-    @Override protected long getTestTimeout() {
-        return Long.MAX_VALUE;
-    }
-
-    @Override public void testRestart() throws Exception {
-
-    }
-
-    @Override public void testRestartWithPutTwoNodesNoBackups() throws Throwable {
-    }
-
-    @Override public void testRestartWithPutTwoNodesOneBackup() throws Throwable {
-    }
-
-    @Override public void testRestartWithPutFourNodesNoBackups() throws Throwable {
-    }
-
-    @Override public void testRestartWithPutFourNodesOneBackups() throws Throwable {
-    }
-
-    @Override public void testRestartWithPutSixNodesTwoBackups() throws Throwable {
-    }
-
-    @Override public void testRestartWithPutEightNodesTwoBackups() throws Throwable {
-    }
-
-    @Override public void testRestartWithTxEightNodesTwoBackups() throws Throwable {
-    }
-
-    @Override public void testRestartWithTxFourNodesNoBackups() throws Throwable {
-    }
-
-    @Override public void testRestartWithTxFourNodesOneBackups() throws Throwable {
-    }
-
-    @Override public void testRestartWithTxSixNodesTwoBackups() throws Throwable {
-    }
-
-    @Override public void testRestartWithTxTenNodesTwoBackups() throws Throwable {
-    }
-
-    @Override public void testRestartWithTxTwoNodesNoBackups() throws Throwable {
-    }
-
-    @Override public void testRestartWithTxTwoNodesOneBackup() throws Throwable {
-    }
 }