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 0A3D3200CE1 for ; Thu, 6 Jul 2017 10:04:19 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 09215165B64; Thu, 6 Jul 2017 08:04:19 +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 45C28165B67 for ; Thu, 6 Jul 2017 10:04:18 +0200 (CEST) Received: (qmail 91727 invoked by uid 500); 6 Jul 2017 08:04:17 -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 91636 invoked by uid 99); 6 Jul 2017 08:04:17 -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, 06 Jul 2017 08:04:17 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8B65BF21AB; Thu, 6 Jul 2017 08:04:16 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.apache.org Date: Thu, 06 Jul 2017 08:04:22 -0000 Message-Id: In-Reply-To: <4eeb8b22a82549068d764dbc8421e2f8@git.apache.org> References: <4eeb8b22a82549068d764dbc8421e2f8@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [07/21] ignite git commit: Added page type check when saving cache metadata (backport of d38fd8d6) archived-at: Thu, 06 Jul 2017 08:04:19 -0000 Added page type check when saving cache metadata (backport of d38fd8d6) Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/54084f56 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/54084f56 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/54084f56 Branch: refs/heads/ignite-gg-12306-1 Commit: 54084f566dc642afac88f48a5efc3319d70e46fb Parents: ace8029 Author: Ivan Rakov Authored: Tue Jul 4 18:01:09 2017 +0300 Committer: Ivan Rakov Committed: Tue Jul 4 18:01:09 2017 +0300 ---------------------------------------------------------------------- .../cache/persistence/GridCacheOffheapManager.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/54084f56/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java index ed008be..0bb2250 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java @@ -314,9 +314,11 @@ public class GridCacheOffheapManager extends IgniteCacheOffheapManagerImpl imple long metaPageAddr = pageMem.writeLock(grpId, metaPageId, metaPage); try { - long nextSnapshotTag = io.getNextSnapshotTag(metaPageAddr); + PageMetaIO metaIo = PageMetaIO.getPageIO(metaPageAddr); - io.setNextSnapshotTag(metaPageAddr, nextSnapshotTag + 1); + long nextSnapshotTag = metaIo.getNextSnapshotTag(metaPageAddr); + + metaIo.setNextSnapshotTag(metaPageAddr, nextSnapshotTag + 1); if (log != null && log.isDebugEnabled()) log.debug("Save next snapshot before checkpoint start for grId = " + grpId @@ -328,7 +330,7 @@ public class GridCacheOffheapManager extends IgniteCacheOffheapManagerImpl imple nextSnapshotTag + 1)); if (state == GridDhtPartitionState.OWNING) - addPartition(ctx.partitionStatMap(), metaPageAddr, io, grpId, PageIdAllocator.INDEX_PARTITION, + addPartition(ctx.partitionStatMap(), metaPageAddr, metaIo, grpId, PageIdAllocator.INDEX_PARTITION, this.ctx.kernalContext().cache().context().pageStore().pages(grpId, PageIdAllocator.INDEX_PARTITION)); } finally { @@ -407,7 +409,7 @@ public class GridCacheOffheapManager extends IgniteCacheOffheapManagerImpl imple private static void addPartition( Map, T2> map, long pageAddr, - PagePartitionMetaIO io, + PageMetaIO io, int cacheId, int partition, int pages