You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2017/05/23 07:35:13 UTC
ignite git commit: IGNITE-5175: Performance degradation using
evictions in near-enabled caches - Fixes #1931.
Repository: ignite
Updated Branches:
refs/heads/master 98a1758d4 -> 211099471
IGNITE-5175: Performance degradation using evictions in near-enabled caches - Fixes #1931.
Signed-off-by: Alexey Goncharuk <al...@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/master
Commit: 2110994715e646b3b2c6cb5f1c30d85ca967d090
Parents: 98a1758
Author: Ivan Rakov <iv...@gmail.com>
Authored: Tue May 23 10:34:55 2017 +0300
Committer: Alexey Goncharuk <al...@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());
}
}