ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [09/41] ignite git commit: IGNITE-5175: Performance degradation using evictions in near-enabled caches - Fixes #1931.
Date Wed, 24 May 2017 17:26:53 GMT
IGNITE-5175: Performance degradation using evictions in near-enabled caches - Fixes #1931.

Signed-off-by: Alexey Goncharuk <alexey.goncharuk@gmail.com>


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

Branch: refs/heads/ignite-5267
Commit: 2110994715e646b3b2c6cb5f1c30d85ca967d090
Parents: 98a1758
Author: Ivan Rakov <ivan.glukos@gmail.com>
Authored: Tue May 23 10:34:55 2017 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Tue May 23 10:34:55 2017 +0300

----------------------------------------------------------------------
 .../paged/PageEvictionMultinodeTest.java        | 22 ++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/21109947/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeTest.java
index 7a58dd4..c2c0775 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeTest.java
@@ -17,12 +17,14 @@
 package org.apache.ignite.internal.processors.cache.eviction.paged;
 
 import java.util.concurrent.ThreadLocalRandom;
+import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
 
 /**
  *
@@ -39,9 +41,25 @@ public abstract class PageEvictionMultinodeTest extends PageEvictionAbstractTest
     private static final CacheWriteSynchronizationMode[] WRITE_MODES = {CacheWriteSynchronizationMode.PRIMARY_SYNC,
         CacheWriteSynchronizationMode.FULL_SYNC, CacheWriteSynchronizationMode.FULL_ASYNC};
 
+    /** Client grid. */
+    private Ignite clientGrid;
+
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
         startGridsMultiThreaded(4, false);
+
+        clientGrid = startGrid("client");
+    }
+
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
+        IgniteConfiguration configuration = super.getConfiguration(gridName);
+
+        if (gridName.startsWith("client"))
+            configuration.setClientMode(true);
+
+        return configuration;
     }
 
     /** {@inheritDoc} */
@@ -77,7 +95,7 @@ public abstract class PageEvictionMultinodeTest extends PageEvictionAbstractTest
      * @throws Exception If failed.
      */
     private void createCacheAndTestEvcition(CacheConfiguration<Object, Object> cfg)
throws Exception {
-        IgniteCache<Object, Object> cache = ignite(0).getOrCreateCache(cfg);
+        IgniteCache<Object, Object> cache = clientGrid.getOrCreateCache(cfg);
 
         for (int i = 1; i <= ENTRIES; i++) {
             ThreadLocalRandom r = ThreadLocalRandom.current();
@@ -105,6 +123,6 @@ public abstract class PageEvictionMultinodeTest extends PageEvictionAbstractTest
         // Eviction started, no OutOfMemory occurred, success.
         assertTrue(resultingSize < ENTRIES);
 
-        ignite(0).destroyCache(cfg.getName());
+        clientGrid.destroyCache(cfg.getName());
     }
 }


Mime
View raw message