ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [49/51] [abbrv] incubator-ignite git commit: Merge branch sprint-2 into ignite-45
Date Thu, 12 Mar 2015 05:36:14 GMT
Merge branch sprint-2 into ignite-45


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

Branch: refs/heads/ignite-45
Commit: b85d95f5a6257ab042a85881c0aee88cb21cf292
Parents: 00f5d4e
Author: Alexey Goncharuk <agoncharuk@gridgain.com>
Authored: Wed Mar 11 15:24:07 2015 -0700
Committer: Alexey Goncharuk <agoncharuk@gridgain.com>
Committed: Wed Mar 11 15:24:07 2015 -0700

----------------------------------------------------------------------
 .../org/apache/ignite/internal/IgnitionEx.java  | 25 ++++----
 .../communication/GridIoMessageFactory.java     |  2 +-
 .../affinity/AffinityTopologyVersion.java       |  2 +-
 .../affinity/GridAffinityProcessor.java         |  2 +-
 .../processors/cache/GridCacheAttributes.java   |  7 --
 .../cache/GridCacheClearAllRunnable.java        |  6 +-
 .../processors/cache/GridCacheContext.java      |  2 +-
 .../GridCachePartitionExchangeManager.java      | 26 ++++----
 .../processors/cache/GridCacheProcessor.java    | 67 ++++++++------------
 .../processors/cache/GridCacheSwapManager.java  |  4 +-
 .../distributed/dht/GridDhtCacheAdapter.java    |  2 +-
 .../distributed/dht/GridDhtTxFinishRequest.java |  4 --
 .../dht/GridDhtTxPrepareRequest.java            |  4 --
 .../dht/GridPartitionedGetFuture.java           |  2 +-
 .../dht/atomic/GridNearAtomicUpdateRequest.java |  5 --
 .../dht/colocated/GridDhtColocatedCache.java    |  2 +-
 .../GridDhtPartitionsExchangeFuture.java        |  4 +-
 .../distributed/near/GridNearCacheEntry.java    |  1 +
 .../distributed/near/GridNearGetRequest.java    |  5 --
 .../near/GridNearTxFinishRequest.java           |  5 --
 .../near/GridNearTxPrepareRequest.java          |  5 --
 .../cacheobject/IgniteCacheObjectProcessor.java |  4 +-
 .../IgniteCacheObjectProcessorImpl.java         | 13 +---
 .../dataload/IgniteDataLoaderImpl.java          |  2 +-
 .../GridCacheOnCopyFlagAbstractSelfTest.java    |  4 +-
 .../cache/IgniteDynamicCacheStartSelfTest.java  |  2 -
 26 files changed, 76 insertions(+), 131 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/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 576ad8a..3c8e953 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
@@ -1904,21 +1904,22 @@ public class IgnitionEx {
          * @return Marshaller system cache configuration.
          */
         private static CacheConfiguration marshallerSystemCache(boolean client) {
-            CacheConfiguration cache = new CacheConfiguration();
+            if (!client) {
+                CacheConfiguration cache = new CacheConfiguration();
 
-            cache.setName(CU.MARSH_CACHE_NAME);
-            cache.setCacheMode(REPLICATED);
-            cache.setAtomicityMode(TRANSACTIONAL);
-            cache.setSwapEnabled(false);
-            cache.setQueryIndexEnabled(false);
-            cache.setPreloadMode(SYNC);
-            cache.setWriteSynchronizationMode(FULL_SYNC);
-            cache.setAffinity(new CacheRendezvousAffinityFunction(false, 100));
+                cache.setName(CU.MARSH_CACHE_NAME);
+                cache.setCacheMode(REPLICATED);
+                cache.setAtomicityMode(TRANSACTIONAL);
+                cache.setSwapEnabled(false);
+                cache.setQueryIndexEnabled(false);
+                cache.setPreloadMode(SYNC);
+                cache.setWriteSynchronizationMode(FULL_SYNC);
+                cache.setAffinity(new CacheRendezvousAffinityFunction(false, 100));
 
-            if (client)
-                cache.setDistributionMode(CLIENT_ONLY);
+                return cache;
+            }
 
-            return cache;
+            return null;
         }
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
index 11b66a6..8c4583f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
@@ -580,7 +580,7 @@ public class GridIoMessageFactory implements MessageFactory {
 
                 break;
 
-            case 89:
+            case 106:
                 msg = new AffinityTopologyVersion();
 
                 break;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/AffinityTopologyVersion.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/AffinityTopologyVersion.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/AffinityTopologyVersion.java
index cb24ecd..68505d8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/AffinityTopologyVersion.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/AffinityTopologyVersion.java
@@ -191,7 +191,7 @@ public class AffinityTopologyVersion implements Comparable<AffinityTopologyVersi
 
     /** {@inheritDoc} */
     @Override public byte directType() {
-        return 89;
+        return 106;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
index cf40186..d90aa81 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
@@ -420,7 +420,7 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
         f.reset();
         m.reset();
 
-        return new AffinityInfo(f, m, t.get3(), ctx.cacheObjects().contextForCache(n, cacheName));
+        return new AffinityInfo(f, m, t.get3(), ctx.cacheObjects().contextForCache(n, cacheName, null));
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java
index 8880678..e8f9ce7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java
@@ -242,13 +242,6 @@ public class GridCacheAttributes implements Serializable {
     }
 
     /**
-     * @return Flag indicating if cached values should be additionally stored in serialized form.
-     */
-    public boolean storeValueBytes() {
-        return ccfg.isStoreValueBytes();
-    }
-
-    /**
      * @return Preload batch size.
      */
     public int preloadBatchSize() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllRunnable.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllRunnable.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllRunnable.java
index 5a7b183..ea1c050 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllRunnable.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllRunnable.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
+import org.apache.ignite.internal.processors.affinity.*;
 import org.apache.ignite.internal.processors.cache.version.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 
@@ -80,7 +81,8 @@ public class GridCacheClearAllRunnable<K, V> implements Runnable {
         if (!ctx.isNear()) {
             if (ctx.swap().offHeapEnabled()) {
                 if (ctx.config().isQueryIndexEnabled()) {
-                    for (Iterator<KeyCacheObject> it = ctx.swap().offHeapKeyIterator(true, true, -1L); it.hasNext();) {
+                    for (Iterator<KeyCacheObject> it =
+                        ctx.swap().offHeapKeyIterator(true, true, AffinityTopologyVersion.NONE); it.hasNext();) {
                         KeyCacheObject key = it.next();
 
                         if (owns(key))
@@ -98,7 +100,7 @@ public class GridCacheClearAllRunnable<K, V> implements Runnable {
                         Iterator<KeyCacheObject> it = null;
 
                         try {
-                            it = ctx.swap().swapKeyIterator(true, true, -1L);
+                            it = ctx.swap().swapKeyIterator(true, true, AffinityTopologyVersion.NONE);
                         }
                         catch (IgniteCheckedException e) {
                             U.error(log, "Failed to get iterator over swap.", e);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/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 8a716d6..2819b96 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
@@ -840,7 +840,7 @@ public class GridCacheContext<K, V> implements Externalizable {
     /**
      * @return Cache configuration for given cache instance.
      */
-    public CacheConfiguration<K, V> config() {
+    public CacheConfiguration config() {
         return cacheCfg;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/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 a7b91f9..1d9e97c 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
@@ -99,8 +99,6 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
      */
     private ExchangeFutureSet exchFuts = new ExchangeFutureSet();
 
-    public static volatile boolean stop = false;
-
     /** Discovery listener. */
     private final GridLocalEventListener discoLsnr = new GridLocalEventListener() {
         @Override public void onEvent(Event evt) {
@@ -118,7 +116,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
                 final ClusterNode n = e.eventNode();
 
                 GridDhtPartitionExchangeId exchId = null;
-                GridDhtPartitionsExchangeFuture<K, V> exchFut = null;
+                GridDhtPartitionsExchangeFuture exchFut = null;
 
                 if (e.type() != EVT_DISCOVERY_CUSTOM_EVT) {
                     assert !loc.id().equals(n.id());
@@ -289,13 +287,13 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
                 }
             }
 
-            for (GridCacheContext<K, V> cacheCtx : cctx.cacheContexts())
+            for (GridCacheContext cacheCtx : cctx.cacheContexts())
                 cacheCtx.preloader().onInitialExchangeComplete(null);
         }
         catch (IgniteFutureTimeoutCheckedException e) {
             IgniteCheckedException err = new IgniteCheckedException("Timed out waiting for exchange future: " + fut, e);
 
-            for (GridCacheContext<K, V> cacheCtx : cctx.cacheContexts())
+            for (GridCacheContext cacheCtx : cctx.cacheContexts())
                 cacheCtx.preloader().onInitialExchangeComplete(err);
 
             throw err;
@@ -533,7 +531,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
         throws IgniteCheckedException {
         GridDhtPartitionsFullMessage m = new GridDhtPartitionsFullMessage(null, null, AffinityTopologyVersion.NONE);
 
-        for (GridCacheContext<K, V> cacheCtx : cctx.cacheContexts()) {
+        for (GridCacheContext cacheCtx : cctx.cacheContexts()) {
             if (!cacheCtx.isLocal())
                 m.addFullPartitionsMap(cacheCtx.cacheId(), cacheCtx.topology().partitionMap(true));
         }
@@ -559,7 +557,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
         throws IgniteCheckedException {
         GridDhtPartitionsSingleMessage m = new GridDhtPartitionsSingleMessage(id, cctx.versions().last());
 
-        for (GridCacheContext<K, V> cacheCtx : cctx.cacheContexts()) {
+        for (GridCacheContext cacheCtx : cctx.cacheContexts()) {
             if (!cacheCtx.isLocal())
                 m.addLocalPartitionMap(cacheCtx.cacheId(), cacheCtx.topology().localPartitionMap());
         }
@@ -634,7 +632,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
         if (fut.onAdded()) {
             exchWorker.addFuture(fut);
 
-            for (GridCacheContext<K, V> cacheCtx : cctx.cacheContexts())
+            for (GridCacheContext cacheCtx : cctx.cacheContexts())
                 cacheCtx.preloader().onExchangeFutureAdded();
 
             return true;
@@ -658,7 +656,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
 
                 boolean updated = false;
 
-                for (GridCacheContext<K, V> cacheCtx : cctx.cacheContexts()) {
+                for (GridCacheContext cacheCtx : cctx.cacheContexts()) {
                     if (!cacheCtx.isLocal()) {
                         GridDhtPartitionTopology top = cacheCtx.topology();
 
@@ -695,7 +693,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
 
                 boolean updated = false;
 
-                for (GridCacheContext<K, V> cacheCtx : cctx.cacheContexts()) {
+                for (GridCacheContext cacheCtx : cctx.cacheContexts()) {
                     if (!cacheCtx.isLocal()) {
                         GridDhtPartitionTopology top = cacheCtx.topology();
 
@@ -805,7 +803,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
                 try {
                     boolean preloadFinished = true;
 
-                    for (GridCacheContext<K, V> cacheCtx : cctx.cacheContexts()) {
+                    for (GridCacheContext cacheCtx : cctx.cacheContexts()) {
                         preloadFinished &= cacheCtx.preloader().syncFuture().isDone();
 
                         if (!preloadFinished)
@@ -861,7 +859,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
                             // Just pick first worker to do this, so we don't
                             // invoke topology callback more than once for the
                             // same event.
-                            for (GridCacheContext<K, V> cacheCtx : cctx.cacheContexts()) {
+                            for (GridCacheContext cacheCtx : cctx.cacheContexts()) {
                                 if (cacheCtx.isLocal())
                                     continue;
 
@@ -894,7 +892,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
                             }
                         }
 
-                        for (GridCacheContext<K, V> cacheCtx : cctx.cacheContexts()) {
+                        for (GridCacheContext cacheCtx : cctx.cacheContexts()) {
                             long delay = cacheCtx.config().getPreloadPartitionedDelay();
 
                             GridDhtPreloaderAssignments<K, V> assigns = null;
@@ -991,7 +989,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
     /**
      *
      */
-    private class ExchangeFutureSet extends GridListSet<GridDhtPartitionsExchangeFuture> {
+    private static class ExchangeFutureSet extends GridListSet<GridDhtPartitionsExchangeFuture> {
         /** */
         private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 26f61f6..83397b0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -61,11 +61,9 @@ import java.util.concurrent.*;
 import static org.apache.ignite.IgniteSystemProperties.*;
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
 import static org.apache.ignite.configuration.CacheConfiguration.*;
-import static org.apache.ignite.cache.CacheDistributionMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 import static org.apache.ignite.cache.CachePreloadMode.*;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
-import static org.apache.ignite.configuration.CacheConfiguration.*;
 import static org.apache.ignite.configuration.DeploymentMode.*;
 import static org.apache.ignite.internal.IgniteComponentType.*;
 import static org.apache.ignite.internal.IgniteNodeAttributes.*;
@@ -597,7 +595,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         for (int i = 0; i < cfgs.length; i++) {
             CacheConfiguration<?, ?> cfg = new CacheConfiguration(cfgs[i]);
 
-            CacheObjectContext cacheObjCtx = ctx.cacheObjects().contextForCache(null, cfg.getName());
+            CacheObjectContext cacheObjCtx = ctx.cacheObjects().contextForCache(null, cfg.getName(), cfg);
 
             // Initialize defaults.
             initialize(cfg, cacheObjCtx);
@@ -615,7 +613,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                         "assign unique name to each cache).");
             }
 
-            GridCacheContext cacheCtx = createCache(cfg, cacheObjCtx); // TODO IGNITE-45
+            GridCacheContext cacheCtx = createCache(cfg, cacheObjCtx);
 
             DynamicCacheDescriptor desc = new DynamicCacheDescriptor(cfg, IgniteUuid.randomUuid());
 
@@ -704,10 +702,14 @@ public class GridCacheProcessor extends GridProcessorAdapter {
             // Check if validation failed on node start.
             desc.checkValid();
 
-            IgnitePredicate filter = desc.cacheConfiguration().getNodeFilter();
+            CacheConfiguration ccfg = desc.cacheConfiguration();
+
+            IgnitePredicate filter = ccfg.getNodeFilter();
 
             if (filter.apply(ctx.discovery().localNode()) && !desc.locallyConfigured()) {
-                GridCacheContext ctx = createCache(desc.cacheConfiguration());
+                CacheObjectContext cacheObjCtx = ctx.cacheObjects().contextForCache(null, ccfg.getName(), ccfg);
+
+                GridCacheContext ctx = createCache(ccfg, cacheObjCtx);
 
                 ctx.dynamicDeploymentId(desc.deploymentId());
 
@@ -715,7 +717,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
                 GridCacheAdapter cache = ctx.cache();
 
-                String name = desc.cacheConfiguration().getName();
+                String name = ccfg.getName();
 
                 caches.put(name, cache);
 
@@ -744,7 +746,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                         .get(order);
 
                     if (fut == null) {
-                        fut = new GridCompoundFuture<>(ctx);
+                        fut = new GridCompoundFuture<>();
 
                         preloadFuts.put(order, fut);
                     }
@@ -771,7 +773,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
             }
         }
 
-        ctx.portable().onCacheProcessorStarted();
+        ctx.cacheObjects().onCacheProcessorStarted();
     }
 
     /** {@inheritDoc} */
@@ -981,7 +983,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      * @throws IgniteCheckedException If failed to create cache.
      */
     @SuppressWarnings( {"unchecked"})
-    private GridCacheContext createCache(CacheConfiguration<?, ?> cfg) throws IgniteCheckedException {
+    private GridCacheContext createCache(CacheConfiguration<?, ?> cfg, CacheObjectContext cacheObjCtx) throws IgniteCheckedException {
         CacheStore cfgStore = cfg.getCacheStoreFactory() != null ? cfg.getCacheStoreFactory().create() : null;
 
         validate(ctx.config(), cfg, cfgStore);
@@ -1008,17 +1010,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
         U.startLifecycleAware(lifecycleAwares(cfg, jta.tmLookup(), cfgStore));
 
-        // Init default key mapper.
-        CacheAffinityKeyMapper dfltAffMapper;
-
-        if (cfg.getAffinityMapper().getClass().equals(GridCacheDefaultAffinityKeyMapper.class))
-            dfltAffMapper = cfg.getAffinityMapper();
-        else {
-            dfltAffMapper = new GridCacheDefaultAffinityKeyMapper();
-
-            prepare(cfg, dfltAffMapper, false);
-        }
-
         GridCacheAffinityManager affMgr = new GridCacheAffinityManager();
         GridCacheEventManager evtMgr = new GridCacheEventManager();
         GridCacheSwapManager swapMgr = new GridCacheSwapManager(cfg.getCacheMode() == LOCAL || !GridCacheUtils.isNearEnabled(cfg));
@@ -1028,7 +1019,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         CacheDataStructuresManager dataStructuresMgr = new CacheDataStructuresManager();
         GridCacheTtlManager ttlMgr = new GridCacheTtlManager();
         GridCacheDrManager drMgr = ctx.createComponent(GridCacheDrManager.class);
-        IgniteCacheSerializationManager serMgr = ctx.createComponent(IgniteCacheSerializationManager.class);
 
         GridCacheStoreManager storeMgr = new GridCacheStoreManager(ctx, sesHolders, cfgStore, cfg);
 
@@ -1044,7 +1034,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
              */
             evtMgr,
             swapMgr,
-            serMgr,
             storeMgr,
             evictMgr,
             qryMgr,
@@ -1055,7 +1044,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
             drMgr,
             jta);
 
-        cacheCtx.defaultAffMapper(dfltAffMapper);
+        cacheCtx.cacheObjectContext(cacheObjCtx);
 
         GridCacheAdapter cache = null;
 
@@ -1169,7 +1158,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                  */
                 evtMgr,
                 swapMgr,
-                serMgr,
                 storeMgr,
                 evictMgr,
                 qryMgr,
@@ -1180,7 +1168,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                 drMgr,
                 jta);
 
-            cacheCtx.defaultAffMapper(dfltAffMapper);
+            cacheCtx.cacheObjectContext(cacheObjCtx);
 
             GridDhtCacheAdapter dht = null;
 
@@ -1276,13 +1264,17 @@ public class GridCacheProcessor extends GridProcessorAdapter {
     public void prepareCacheStart(DynamicCacheChangeRequest req) throws IgniteCheckedException {
         assert req.isStart() || req.isClientStart();
 
-        IgnitePredicate nodeFilter = req.startCacheConfiguration().getNodeFilter();
+        CacheConfiguration ccfg = req.startCacheConfiguration();
+
+        IgnitePredicate nodeFilter = ccfg.getNodeFilter();
 
         ClusterNode locNode = ctx.discovery().localNode();
 
         if (req.isStart()) {
             if (nodeFilter.apply(locNode)) {
-                GridCacheContext cacheCtx = createCache(req.startCacheConfiguration());
+                CacheObjectContext cacheObjCtx = ctx.cacheObjects().contextForCache(null, ccfg.getName(), ccfg);
+
+                GridCacheContext cacheCtx = createCache(ccfg, cacheObjCtx);
 
                 cacheCtx.dynamicDeploymentId(req.deploymentId());
 
@@ -1302,7 +1294,9 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                     return;
                 }
 
-                GridCacheContext cacheCtx = createCache(req.startCacheConfiguration());
+                CacheObjectContext cacheObjCtx = ctx.cacheObjects().contextForCache(null, ccfg.getName(), ccfg);
+
+                GridCacheContext cacheCtx = createCache(ccfg, cacheObjCtx);
 
                 cacheCtx.dynamicDeploymentId(req.deploymentId());
 
@@ -1470,14 +1464,16 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         try {
             CacheConfiguration cfg = new CacheConfiguration(ccfg);
 
-            initialize(cfg);
+            CacheObjectContext cacheObjCtx = ctx.cacheObjects().contextForCache(null, ccfg.getName(), ccfg);
+
+            initialize(cfg, cacheObjCtx);
 
             DynamicCacheChangeRequest req = new DynamicCacheChangeRequest(cfg);
 
             return F.first(initiateCacheChanges(F.asList(req)));
         }
         catch (IgniteCheckedException e) {
-            return new GridFinishedFutureEx<>(e);
+            return new GridFinishedFuture(e);
         }
     }
 
@@ -1499,7 +1495,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         Collection<DynamicCacheChangeRequest> sendReqs = new ArrayList<>(reqs.size());
 
         for (DynamicCacheChangeRequest req : reqs) {
-            DynamicCacheStartFuture fut = new DynamicCacheStartFuture(ctx, req.cacheName(), req.deploymentId());
+            DynamicCacheStartFuture fut = new DynamicCacheStartFuture(req.cacheName(), req.deploymentId());
 
             try {
                 for (CacheConfiguration ccfg0 : ctx.config().getCacheConfiguration()) {
@@ -1593,8 +1589,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                     DynamicCacheStartFuture startFut = (DynamicCacheStartFuture)pendingFuts.get(ccfg.getName());
 
                     if (startFut != null && startFut.deploymentId().equals(req.deploymentId())) {
-                        assert !startFut.syncNotify();
-
                         startFut.onDone(new IgniteCheckedException("Failed to start cache " +
                             "(a cache with the same name is already started): " + ccfg.getName()));
                     }
@@ -1631,8 +1625,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                     DynamicCacheStartFuture changeFut = (DynamicCacheStartFuture)pendingFuts.get(req.cacheName());
 
                     if (changeFut != null && changeFut.deploymentId().equals(req.deploymentId())) {
-                        assert !changeFut.syncNotify();
-
                         // No-op.
                         changeFut.onDone();
                     }
@@ -1819,9 +1811,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
             CU.checkAttributeMismatch(log, rmtAttr.cacheName(), rmt, "queryIndexEnabled",
                 "Query index enabled", locAttr.queryIndexEnabled(), rmtAttr.queryIndexEnabled(), true);
 
-            CU.checkAttributeMismatch(log, rmtAttr.cacheName(), rmt, "storeValueBytes",
-                "Store value bytes", locAttr.storeValueBytes(), rmtAttr.storeValueBytes(), true);
-
             CU.checkAttributeMismatch(log, rmtAttr.cacheName(), rmt, "queryIndexEnabled",
                 "Query index enabled", locAttr.queryIndexEnabled(), rmtAttr.queryIndexEnabled(), true);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
index 67b2a0a..09850da 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
@@ -1311,7 +1311,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
     /**
      * @return Iterator over off-heap keys.
      */
-    public Iterator<KeyCacheObject> offHeapKeyIterator(boolean primary, boolean backup, long topVer) {
+    public Iterator<KeyCacheObject> offHeapKeyIterator(boolean primary, boolean backup, AffinityTopologyVersion topVer) {
         assert primary || backup;
 
         if (!offheapEnabled)
@@ -1335,7 +1335,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
     /**
      * @return Iterator over off-heap keys.
      */
-    public Iterator<KeyCacheObject> swapKeyIterator(boolean primary, boolean backup, long topVer)
+    public Iterator<KeyCacheObject> swapKeyIterator(boolean primary, boolean backup, AffinityTopologyVersion topVer)
         throws IgniteCheckedException {
         assert primary || backup;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
index 09466a8..be711a8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
@@ -208,7 +208,7 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
 
             topVer = top.topologyVersion();
 
-            MultiUpdateFuture fut = new MultiUpdateFuture(ctx.kernalContext(), topVer);
+            MultiUpdateFuture fut = new MultiUpdateFuture(topVer);
 
             MultiUpdateFuture old = multiTxFuts.putIfAbsent(lockId, fut);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
index 82979fc..dadadec 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
@@ -284,8 +284,6 @@ public class GridDhtTxFinishRequest extends GridDistributedTxFinishRequest {
                 writer.incrementState();
 
             case 27:
-                if (!writer.writeLong("topVer", topVer))
-                    return false;
 
                 writer.incrementState();
 
@@ -372,8 +370,6 @@ public class GridDhtTxFinishRequest extends GridDistributedTxFinishRequest {
                 reader.incrementState();
 
             case 27:
-                topVer = reader.readLong("topVer");
-
                 if (!reader.isLastRead())
                     return false;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
index 3ba146f..5c7b074 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
@@ -410,8 +410,6 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
                 writer.incrementState();
 
             case 37:
-                if (!writer.writeLong("topVer", topVer))
-                    return false;
 
                 writer.incrementState();
 
@@ -528,8 +526,6 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
                 reader.incrementState();
 
             case 37:
-                topVer = reader.readLong("topVer");
-
                 if (!reader.isLastRead())
                     return false;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
index c64dc4a..45dae66 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
@@ -330,7 +330,7 @@ public class GridPartitionedGetFuture<K, V> extends GridCompoundIdentityFuture<M
                             remapKeys.add(key);
                     }
 
-                    AffinityTopologyVersion updTopVer = new AffinityTopologyVersion(ctx.discovery().topologyVersion());
+                    AffinityTopologyVersion updTopVer = new AffinityTopologyVersion(cctx.discovery().topologyVersion());
 
                     assert updTopVer.compareTo(topVer) > 0 : "Got invalid partitions for local node but topology version did " +
                         "not change [topVer=" + topVer + ", updTopVer=" + updTopVer +

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
index a5487d4..157966f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
@@ -671,9 +671,6 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements Gri
                 writer.incrementState();
 
             case 20:
-                if (!writer.writeLong("topVer", topVer))
-                    return false;
-
                 writer.incrementState();
 
             case 21:
@@ -849,8 +846,6 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements Gri
                 reader.incrementState();
 
             case 20:
-                topVer = reader.readLong("topVer");
-
                 if (!reader.isLastRead())
                     return false;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
index ee0439f..f5c502c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
@@ -614,7 +614,7 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
         @Nullable final GridNearTxLocal tx,
         final long threadId,
         final GridCacheVersion ver,
-        AffinityTopologyVersion topVer,
+        final AffinityTopologyVersion topVer,
         final Collection<KeyCacheObject> keys,
         final boolean txRead,
         final long timeout,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/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 43f5566..1933ae6 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
@@ -558,7 +558,7 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
     private void startCaches() throws IgniteCheckedException {
         for (DynamicCacheChangeRequest req : reqs) {
             if (req.isStart() || req.isClientStart())
-                ctx.cache().prepareCacheStart(req);
+                cctx.cache().prepareCacheStart(req);
         }
     }
 
@@ -568,7 +568,7 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
     private void stopCaches() {
         for (DynamicCacheChangeRequest req : reqs) {
             if (req.isStop())
-                ctx.cache().prepareCacheStop(req);
+                cctx.cache().prepareCacheStop(req);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java
index 01c9d0a..2db8743 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java
@@ -27,6 +27,7 @@ import org.apache.ignite.internal.processors.cache.transactions.*;
 import org.apache.ignite.internal.processors.cache.version.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
 import org.jetbrains.annotations.*;
 
 import java.util.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
index 1203950..ca8bb31 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
@@ -336,9 +336,6 @@ public class GridNearGetRequest extends GridCacheMessage implements GridCacheDep
                 writer.incrementState();
 
             case 13:
-                if (!writer.writeLong("topVer", topVer))
-                    return false;
-
                 writer.incrementState();
 
             case 14:
@@ -444,8 +441,6 @@ public class GridNearGetRequest extends GridCacheMessage implements GridCacheDep
                 reader.incrementState();
 
             case 13:
-                topVer = reader.readLong("topVer");
-
                 if (!reader.isLastRead())
                     return false;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
index 015d400..adb2b10 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
@@ -201,9 +201,6 @@ public class GridNearTxFinishRequest extends GridDistributedTxFinishRequest {
                 writer.incrementState();
 
             case 25:
-                if (!writer.writeLong("topVer", topVer))
-                    return false;
-
                 writer.incrementState();
 
         }
@@ -263,8 +260,6 @@ public class GridNearTxFinishRequest extends GridDistributedTxFinishRequest {
                 reader.incrementState();
 
             case 25:
-                topVer = reader.readLong("topVer");
-
                 if (!reader.isLastRead())
                     return false;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
index 3c4aed8..85c9452 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
@@ -313,9 +313,6 @@ public class GridNearTxPrepareRequest extends GridDistributedTxPrepareRequest {
                 writer.incrementState();
 
             case 34:
-                if (!writer.writeLong("topVer", topVer))
-                    return false;
-
                 writer.incrementState();
 
         }
@@ -407,8 +404,6 @@ public class GridNearTxPrepareRequest extends GridDistributedTxPrepareRequest {
                 reader.incrementState();
 
             case 34:
-                topVer = reader.readLong("topVer");
-
                 if (!reader.isLastRead())
                     return false;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessor.java
index ce2c579..d5eafbe 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessor.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cacheobject;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cluster.*;
+import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.processors.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.jetbrains.annotations.*;
@@ -108,7 +109,8 @@ public interface IgniteCacheObjectProcessor extends GridProcessor {
      * @param cacheName Cache name.
      * @return Cache object context.
      */
-    public CacheObjectContext contextForCache(ClusterNode node, @Nullable String cacheName);
+    public CacheObjectContext contextForCache(ClusterNode node, @Nullable String cacheName,
+        @Nullable CacheConfiguration ccfg);
 
     /**
      * @param ctx Cache context.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
index 1966a21..b8d45aa 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
@@ -256,17 +256,8 @@ public class IgniteCacheObjectProcessorImpl extends GridProcessorAdapter impleme
     }
 
     /** {@inheritDoc} */
-    @Override public CacheObjectContext contextForCache(ClusterNode node, @Nullable String cacheName) {
-        CacheConfiguration ccfg = null;
-
-        for (CacheConfiguration ccfg0 : ctx.config().getCacheConfiguration()) {
-            if (F.eq(cacheName, ccfg0.getName())) {
-                ccfg = ccfg0;
-
-                break;
-            }
-        }
-
+    @Override public CacheObjectContext contextForCache(ClusterNode node, @Nullable String cacheName,
+        @Nullable CacheConfiguration ccfg) {
         if (ccfg != null) {
             CacheMemoryMode memMode = ccfg.getMemoryMode();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/IgniteDataLoaderImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/IgniteDataLoaderImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/IgniteDataLoaderImpl.java
index ad1937f..0930868 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/IgniteDataLoaderImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/IgniteDataLoaderImpl.java
@@ -179,7 +179,7 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
         if (node == null)
             throw new IllegalStateException("Cache doesn't exist: " + cacheName);
 
-        this.cacheObjCtx = ctx.cacheObjects().contextForCache(node, cacheName);
+        this.cacheObjCtx = ctx.cacheObjects().contextForCache(node, cacheName, null);
         this.cacheName = cacheName;
         this.flushQ = flushQ;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOnCopyFlagAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOnCopyFlagAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOnCopyFlagAbstractSelfTest.java
index ea846dd..378d138 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOnCopyFlagAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOnCopyFlagAbstractSelfTest.java
@@ -31,7 +31,6 @@ import javax.cache.processor.*;
 import java.io.*;
 import java.util.*;
 
-import static org.apache.ignite.cache.CacheDistributionMode.*;
 import static org.junit.Assert.*;
 
 /**
@@ -111,9 +110,8 @@ public abstract class GridCacheOnCopyFlagAbstractSelfTest extends GridCacheAbstr
         ccfg.setInterceptor(interceptor);
 
         ccfg.setAtomicityMode(atomicityMode());
-        ccfg.setDistributionMode(distributionMode());
         ccfg.setCacheMode(cacheMode());
-        ccfg.setDistributionMode(PARTITIONED_ONLY);
+        ccfg.setNearConfiguration(null);
 
         return ccfg;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b85d95f5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
index 7e311cc..6efc2a8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
@@ -457,8 +457,6 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
                 }
             }, IllegalArgumentException.class, null);
 
-            GridCachePartitionExchangeManager.stop = true;
-
             // Should obtain client cache on new node.
             IgniteCache<Object, Object> clientCache = ignite(nodeCount()).jcache(DYNAMIC_CACHE_NAME);
 


Mime
View raw message