ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [01/11] incubator-ignite git commit: IGNITE-644 - Marshaller cache config
Date Wed, 01 Apr 2015 06:19:57 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-598 3f2da5a48 -> 481cc35d8


IGNITE-644 - Marshaller cache config


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

Branch: refs/heads/ignite-598
Commit: 5ee3767d916018922f59edc2fd70b13349e1afc4
Parents: bca4198
Author: Valentin Kulichenko <vkulichenko@gridgain.com>
Authored: Mon Mar 30 12:37:13 2015 -0700
Committer: Valentin Kulichenko <vkulichenko@gridgain.com>
Committed: Mon Mar 30 12:37:13 2015 -0700

----------------------------------------------------------------------
 .../org/apache/ignite/internal/IgnitionEx.java  | 34 +++++++++-----------
 .../distributed/near/GridNearAtomicCache.java   |  3 +-
 2 files changed, 17 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5ee3767d/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 4c8a567..7442d12 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
@@ -1751,7 +1751,7 @@ public class IgnitionEx {
             }
 
             // Always add marshaller and utility caches.
-            copies[0] = marshallerSystemCache(clientDisco);
+            copies[0] = marshallerSystemCache();
             copies[1] = utilitySystemCache(clientDisco);
 
             cfg.setCacheConfiguration(copies);
@@ -1897,26 +1897,22 @@ public class IgnitionEx {
         /**
          * Creates marshaller system cache configuration.
          *
-         * @param client If {@code true} creates client-only cache configuration.
          * @return Marshaller system cache configuration.
          */
-        private static CacheConfiguration marshallerSystemCache(boolean client) {
-            if (!client) {
-                CacheConfiguration cache = new CacheConfiguration();
-
-                cache.setName(CU.MARSH_CACHE_NAME);
-                cache.setCacheMode(REPLICATED);
-                cache.setAtomicityMode(ATOMIC);
-                cache.setSwapEnabled(false);
-                cache.setRebalanceMode(SYNC);
-                cache.setWriteSynchronizationMode(FULL_SYNC);
-                cache.setAffinity(new RendezvousAffinityFunction(false, 100));
-                cache.setNodeFilter(CacheConfiguration.ALL_NODES);
-
-                return cache;
-            }
-
-            return null;
+        private static CacheConfiguration marshallerSystemCache() {
+            CacheConfiguration cache = new CacheConfiguration();
+
+            cache.setName(CU.MARSH_CACHE_NAME);
+            cache.setCacheMode(REPLICATED);
+            cache.setAtomicityMode(ATOMIC);
+            cache.setSwapEnabled(false);
+            cache.setRebalanceMode(SYNC);
+            cache.setWriteSynchronizationMode(FULL_SYNC);
+            cache.setAffinity(new RendezvousAffinityFunction(false, 20));
+            cache.setNodeFilter(CacheConfiguration.ALL_NODES);
+            cache.setStartSize(300);
+
+            return cache;
         }
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5ee3767d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
index 6e24261..d34b13b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
@@ -69,7 +69,8 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K,
V> {
     public GridNearAtomicCache(GridCacheContext<K, V> ctx) {
         super(ctx);
 
-        int size = Integer.getInteger(IGNITE_ATOMIC_CACHE_DELETE_HISTORY_SIZE, 1_000_000);
+        int size = CU.isSystemCache(ctx.name()) ? 100 :
+            Integer.getInteger(IGNITE_ATOMIC_CACHE_DELETE_HISTORY_SIZE, 1_000_000);
 
         rmvQueue = new GridCircularBuffer<>(U.ceilPow2(size / 10));
     }


Mime
View raw message