Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C9E1E200BF8 for ; Thu, 29 Dec 2016 10:37:09 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C8D7F160B40; Thu, 29 Dec 2016 09:37:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 164E4160B5F for ; Thu, 29 Dec 2016 10:37:07 +0100 (CET) Received: (qmail 84173 invoked by uid 500); 29 Dec 2016 09:37:07 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 83178 invoked by uid 99); 29 Dec 2016 09:37:06 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Dec 2016 09:37:06 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D39DFDFC11; Thu, 29 Dec 2016 09:37:06 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: agoncharuk@apache.org To: commits@ignite.apache.org Date: Thu, 29 Dec 2016 09:37:46 -0000 Message-Id: <98d0619d9a1b477eab8468ff008bd968@git.apache.org> In-Reply-To: <9ed165a678e44bff8ed6ffb3e90a45ab@git.apache.org> References: <9ed165a678e44bff8ed6ffb3e90a45ab@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [42/50] [abbrv] ignite git commit: ignite-gg-11650 Stabilize 8.0.2.ea1 fix cache template config archived-at: Thu, 29 Dec 2016 09:37:09 -0000 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 Authored: Mon Dec 26 19:37:43 2016 +0300 Committer: Dmitriy Govorukhin 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> sharedMgrs = sharedCtx.managers(); - - for (ListIterator> 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 ccfgList, - boolean failIfExists, - boolean checkThreadTx + Collection 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 initiateCacheChanges( - Collection reqs, - boolean failIfExists + Collection reqs, boolean failIfExists ) { Collection res = new ArrayList<>(reqs.size());