ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [42/50] [abbrv] ignite git commit: ignite-gg-11650 Stabilize 8.0.2.ea1 fix cache template config
Date Thu, 29 Dec 2016 09:37:46 GMT
ignite-gg-11650 Stabilize 8.0.2.ea1 fix cache template config


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

Branch: refs/heads/ignite-3477
Commit: e8f6a540a95728c04da921b84b8c7376c35e47a2
Parents: cb56333
Author: Dmitriy Govorukhin <dgovorukhin@gridgain.com>
Authored: Mon Dec 26 19:37:43 2016 +0300
Committer: Dmitriy Govorukhin <dgovorukhin@gridgain.com>
Committed: Mon Dec 26 19:37:43 2016 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheProcessor.java    | 35 ++++----------------
 1 file changed, 7 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e8f6a540/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 554d062..4f299dd 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
@@ -645,8 +645,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      * @param cfg Cache configuration.
      * @throws IgniteCheckedException If failed.
      */
-    private void registerCache(CacheConfiguration<?, ?> cfg)
-        throws IgniteCheckedException {
+    private void registerCache(CacheConfiguration<?, ?> cfg) throws IgniteCheckedException
{
         cloneCheckSerializable(cfg);
 
         CacheObjectContext cacheObjCtx = ctx.cacheObjects().contextForCache(cfg);
@@ -784,9 +783,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                 activeOnStart = currentStatus;
             }
 
-            if (activeOnStart)
-                if (!ctx.clientNode())
-                    sharedCtx.database().lock();
+            if (activeOnStart && !ctx.clientNode() && !ctx.isDaemon())
+                sharedCtx.database().lock();
 
             //must start database before start first cache
             sharedCtx.database().onKernalStart(false);
@@ -832,7 +830,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                 }
             }
         }
-        //todo if in active caches not started on start
         finally {
             cacheStartedLatch.countDown();
         }
@@ -849,10 +846,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         for (GridCacheAdapter<?, ?> cache : caches.values())
             onKernalStart(cache);
 
-        //todo
-     /*   if (!ctx.state().active())
-            return;*/
-
         ctx.marshallerContext().onMarshallerCacheStarted(ctx);
 
         if (!ctx.config().isDaemon())
@@ -1024,19 +1017,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                 onKernalStop(entry.getValue(), cancel);
             }
         }
-
-        //todo chek it
-        /*cancelFutures();
-
-        List<? extends GridCacheSharedManager<?, ?>> sharedMgrs = sharedCtx.managers();
-
-        for (ListIterator<? extends GridCacheSharedManager<?, ?>> it = sharedMgrs.listIterator(sharedMgrs.size());
-            it.hasPrevious(); ) {
-            GridCacheSharedManager<?, ?> mgr = it.previous();
-
-            if (mgr != exch)
-                mgr.onKernalStop(cancel);
-        }*/
     }
 
     /** {@inheritDoc} */
@@ -2458,9 +2438,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      * @return Future that will be completed when all caches are deployed.
      */
     public IgniteInternalFuture<?> dynamicStartCaches(
-        Collection<CacheConfiguration> ccfgList,
-        boolean failIfExists,
-        boolean checkThreadTx
+        Collection<CacheConfiguration> ccfgList, boolean failIfExists, boolean checkThreadTx
     ) {
         return dynamicStartCaches(ccfgList, CacheType.USER, failIfExists, checkThreadTx);
     }
@@ -2681,6 +2659,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
         req.startCacheConfiguration(cfg);
 
+        req.template(cfg.getName() != null && cfg.getName().endsWith("*"));
+
         req.nearCacheConfiguration(cfg.getNearConfiguration());
 
         req.deploymentId(IgniteUuid.randomUuid());
@@ -2704,8 +2684,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      */
     @SuppressWarnings("TypeMayBeWeakened")
     private Collection<DynamicCacheStartFuture> initiateCacheChanges(
-        Collection<DynamicCacheChangeRequest> reqs,
-        boolean failIfExists
+        Collection<DynamicCacheChangeRequest> reqs, boolean failIfExists
     ) {
         Collection<DynamicCacheStartFuture> res = new ArrayList<>(reqs.size());
 


Mime
View raw message