ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [08/46] ignite git commit: Added page type check when saving cache metadata (backport of d38fd8d6)
Date Fri, 07 Jul 2017 09:34:11 GMT
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-2.1
Commit: 54084f566dc642afac88f48a5efc3319d70e46fb
Parents: ace8029
Author: Ivan Rakov <ivan.glukos@gmail.com>
Authored: Tue Jul 4 18:01:09 2017 +0300
Committer: Ivan Rakov <ivan.glukos@gmail.com>
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<Integer, Integer>, T2<Integer, Integer>> map,
         long pageAddr,
-        PagePartitionMetaIO io,
+        PageMetaIO io,
         int cacheId,
         int partition,
         int pages


Mime
View raw message