ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [4/5] ignite git commit: Rename cacheId -> grpId.
Date Fri, 07 Jul 2017 11:34:37 GMT
http://git-wip-us.apache.org/repos/asf/ignite/blob/89e74546/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java
index 28bf6e4..8d09a9f 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java
@@ -269,8 +269,8 @@ public class FilePageStoreManager extends GridCacheSharedManagerAdapter implemen
     }
 
     /** {@inheritDoc} */
-    @Override public void read(int cacheId, long pageId, ByteBuffer pageBuf) throws IgniteCheckedException {
-        read(cacheId, pageId, pageBuf, false);
+    @Override public void read(int grpId, long pageId, ByteBuffer pageBuf) throws IgniteCheckedException {
+        read(grpId, pageId, pageBuf, false);
     }
 
     /**
@@ -296,20 +296,20 @@ public class FilePageStoreManager extends GridCacheSharedManagerAdapter implemen
     }
 
     /** {@inheritDoc} */
-    @Override public void readHeader(int cacheId, int partId, ByteBuffer buf) throws IgniteCheckedException {
-        PageStore store = getStore(cacheId, partId);
+    @Override public void readHeader(int grpId, int partId, ByteBuffer buf) throws IgniteCheckedException {
+        PageStore store = getStore(grpId, partId);
 
         store.readHeader(buf);
     }
 
     /** {@inheritDoc} */
-    @Override public void write(int cacheId, long pageId, ByteBuffer pageBuf,int tag) throws IgniteCheckedException {
-        writeInternal(cacheId, pageId, pageBuf, tag);
+    @Override public void write(int grpId, long pageId, ByteBuffer pageBuf, int tag) throws IgniteCheckedException {
+        writeInternal(grpId, pageId, pageBuf, tag);
     }
 
     /** {@inheritDoc} */
-    @Override public long pageOffset(int cacheId, long pageId) throws IgniteCheckedException {
-        PageStore store = getStore(cacheId, PageIdUtils.partId(pageId));
+    @Override public long pageOffset(int grpId, long pageId) throws IgniteCheckedException {
+        PageStore store = getStore(grpId, PageIdUtils.partId(pageId));
 
         return store.pageOffset(pageId);
     }
@@ -445,20 +445,20 @@ public class FilePageStoreManager extends GridCacheSharedManagerAdapter implemen
     }
 
     /** {@inheritDoc} */
-    @Override public void sync(int cacheId, int partId) throws IgniteCheckedException {
-        getStore(cacheId, partId).sync();
+    @Override public void sync(int grpId, int partId) throws IgniteCheckedException {
+        getStore(grpId, partId).sync();
     }
 
     /** {@inheritDoc} */
-    @Override public void ensure(int cacheId, int partId) throws IgniteCheckedException {
-        getStore(cacheId, partId).ensure();
+    @Override public void ensure(int grpId, int partId) throws IgniteCheckedException {
+        getStore(grpId, partId).ensure();
     }
 
     /** {@inheritDoc} */
-    @Override public long allocatePage(int cacheId, int partId, byte flags) throws IgniteCheckedException {
+    @Override public long allocatePage(int grpId, int partId, byte flags) throws IgniteCheckedException {
         assert partId <= PageIdAllocator.MAX_PARTITION_ID || partId == PageIdAllocator.INDEX_PARTITION;
 
-        PageStore store = getStore(cacheId, partId);
+        PageStore store = getStore(grpId, partId);
 
         long pageIdx = store.allocatePage();
 
@@ -466,13 +466,13 @@ public class FilePageStoreManager extends GridCacheSharedManagerAdapter implemen
     }
 
     /** {@inheritDoc} */
-    @Override public long metaPageId(final int cacheId) {
+    @Override public long metaPageId(final int grpId) {
         return metaPageId;
     }
 
     /** {@inheritDoc} */
-    @Override public int pages(int cacheId, int partId) throws IgniteCheckedException {
-        PageStore store = getStore(cacheId, partId);
+    @Override public int pages(int grpId, int partId) throws IgniteCheckedException {
+        PageStore store = getStore(grpId, partId);
 
         return store.pages();
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/89e74546/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/FreeListImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/FreeListImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/FreeListImpl.java
index 844bc02..e99a5ee 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/FreeListImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/FreeListImpl.java
@@ -203,7 +203,7 @@ public class FreeListImpl extends PagesList implements FreeList, ReuseList {
                 PageUtils.getBytes(pageAddr, data.offset(), payload, 0, rowSize);
 
                 wal.log(new DataPageInsertRecord(
-                    cacheId,
+                    grpId,
                     pageId,
                     payload));
             }
@@ -246,7 +246,7 @@ public class FreeListImpl extends PagesList implements FreeList, ReuseList {
 
                 PageUtils.getBytes(pageAddr, data.offset(), payload, 0, payloadSize);
 
-                wal.log(new DataPageInsertFragmentRecord(cacheId, pageId, payload, lastLink));
+                wal.log(new DataPageInsertFragmentRecord(grpId, pageId, payload, lastLink));
             }
 
             return written + payloadSize;
@@ -448,7 +448,7 @@ public class FreeListImpl extends PagesList implements FreeList, ReuseList {
         assert part <= PageIdAllocator.MAX_PARTITION_ID;
         assert part != PageIdAllocator.INDEX_PARTITION;
 
-        return pageMem.allocatePage(cacheId, part, PageIdAllocator.FLAG_DATA);
+        return pageMem.allocatePage(grpId, part, PageIdAllocator.FLAG_DATA);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/89e74546/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/PagesList.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/PagesList.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/PagesList.java
index eb5df6b..39a6865 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/PagesList.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/PagesList.java
@@ -333,7 +333,7 @@ public abstract class PagesList extends DataStructure {
                     io.resetCount(pageAddr);
 
                     if (needWalDeltaRecord(pageId, page, null))
-                        wal.log(new PageListMetaResetCountRecord(cacheId, pageId));
+                        wal.log(new PageListMetaResetCountRecord(grpId, pageId));
 
                     nextPageId = io.getNextMetaPageId(pageAddr);
                 }
@@ -682,13 +682,13 @@ public abstract class PagesList extends DataStructure {
             incrementBucketSize(bucket);
 
             if (needWalDeltaRecord(pageId, page, null))
-                wal.log(new PagesListAddPageRecord(cacheId, pageId, dataId));
+                wal.log(new PagesListAddPageRecord(grpId, pageId, dataId));
 
             DataPageIO dataIO = DataPageIO.VERSIONS.forPage(dataAddr);
             dataIO.setFreeListPageId(dataAddr, pageId);
 
             if (needWalDeltaRecord(dataId, dataPage, null))
-                wal.log(new DataPageSetFreeListPageRecord(cacheId, dataId, pageId));
+                wal.log(new DataPageSetFreeListPageRecord(grpId, dataId, pageId));
         }
 
         return true;
@@ -728,11 +728,11 @@ public abstract class PagesList extends DataStructure {
             setupNextPage(io, pageId, pageAddr, newDataId, dataAddr);
 
             if (needWalDeltaRecord(pageId, page, null))
-                wal.log(new PagesListSetNextRecord(cacheId, pageId, newDataId));
+                wal.log(new PagesListSetNextRecord(grpId, pageId, newDataId));
 
             if (needWalDeltaRecord(dataId, data, null))
                 wal.log(new PagesListInitNewPageRecord(
-                    cacheId,
+                    grpId,
                     dataId,
                     io.getType(),
                     io.getVersion(),
@@ -761,13 +761,13 @@ public abstract class PagesList extends DataStructure {
                     setupNextPage(io, pageId, pageAddr, nextId, nextPageAddr);
 
                     if (needWalDeltaRecord(pageId, page, null))
-                        wal.log(new PagesListSetNextRecord(cacheId, pageId, nextId));
+                        wal.log(new PagesListSetNextRecord(grpId, pageId, nextId));
 
                     int idx = io.addPage(nextPageAddr, dataId, pageSize());
 
                     if (needWalDeltaRecord(nextId, nextPage, nextWalPlc))
                         wal.log(new PagesListInitNewPageRecord(
-                            cacheId,
+                            grpId,
                             nextId,
                             io.getType(),
                             io.getVersion(),
@@ -781,7 +781,7 @@ public abstract class PagesList extends DataStructure {
                     dataIO.setFreeListPageId(dataAddr, nextId);
 
                     if (needWalDeltaRecord(dataId, data, null))
-                        wal.log(new DataPageSetFreeListPageRecord(cacheId, dataId, nextId));
+                        wal.log(new DataPageSetFreeListPageRecord(grpId, dataId, nextId));
 
                     incrementBucketSize(bucket);
 
@@ -853,12 +853,12 @@ public abstract class PagesList extends DataStructure {
                         setupNextPage(io, prevId, prevAddr, nextId, nextPageAddr);
 
                         if (needWalDeltaRecord(prevId, prevPage, walPlc))
-                            wal.log(new PagesListSetNextRecord(cacheId, prevId, nextId));
+                            wal.log(new PagesListSetNextRecord(grpId, prevId, nextId));
 
                         // Here we should never write full page, because it is known to be new.
                         if (needWalDeltaRecord(nextId, nextPage, FALSE))
                             wal.log(new PagesListInitNewPageRecord(
-                                cacheId,
+                                grpId,
                                 nextId,
                                 io.getType(),
                                 io.getVersion(),
@@ -887,7 +887,7 @@ public abstract class PagesList extends DataStructure {
                 else {
                     // TODO: use single WAL record for bag?
                     if (needWalDeltaRecord(prevId, prevPage, walPlc))
-                        wal.log(new PagesListAddPageRecord(cacheId, prevId, nextId));
+                        wal.log(new PagesListAddPageRecord(grpId, prevId, nextId));
 
                     incrementBucketSize(bucket);
                 }
@@ -1035,7 +1035,7 @@ public abstract class PagesList extends DataStructure {
                         decrementBucketSize(bucket);
 
                         if (needWalDeltaRecord(tailId, tailPage, null))
-                            wal.log(new PagesListRemovePageRecord(cacheId, tailId, pageId));
+                            wal.log(new PagesListRemovePageRecord(grpId, tailId, pageId));
 
                         dirty = true;
 
@@ -1085,7 +1085,7 @@ public abstract class PagesList extends DataStructure {
                             initIo.initNewPage(tailAddr, dataPageId, pageSize());
 
                             if (needWalDeltaRecord(tailId, tailPage, null)) {
-                                wal.log(new InitNewPageRecord(cacheId, tailId, initIo.getType(),
+                                wal.log(new InitNewPageRecord(grpId, tailId, initIo.getType(),
                                     initIo.getVersion(), dataPageId));
                             }
                         }
@@ -1163,13 +1163,13 @@ public abstract class PagesList extends DataStructure {
                 decrementBucketSize(bucket);
 
                 if (needWalDeltaRecord(pageId, page, null))
-                    wal.log(new PagesListRemovePageRecord(cacheId, pageId, dataId));
+                    wal.log(new PagesListRemovePageRecord(grpId, pageId, dataId));
 
                 // Reset free list page ID.
                 dataIO.setFreeListPageId(dataAddr, 0L);
 
                 if (needWalDeltaRecord(dataId, dataPage, null))
-                    wal.log(new DataPageSetFreeListPageRecord(cacheId, dataId, 0L));
+                    wal.log(new DataPageSetFreeListPageRecord(grpId, dataId, 0L));
 
                 if (!io.isEmpty(pageAddr))
                     return true; // In optimistic case we still have something in the page and can leave it as is.
@@ -1343,7 +1343,7 @@ public abstract class PagesList extends DataStructure {
                 nextIO.setPreviousId(nextAddr, 0);
 
                 if (needWalDeltaRecord(nextId, nextPage, null))
-                    wal.log(new PagesListSetPreviousRecord(cacheId, nextId, 0L));
+                    wal.log(new PagesListSetPreviousRecord(grpId, nextId, 0L));
             }
             else // Do a fair merge: link previous and next to each other.
                 fairMerge(prevId, pageId, nextId, nextPage, nextAddr);
@@ -1384,12 +1384,12 @@ public abstract class PagesList extends DataStructure {
                 prevIO.setNextId(prevAddr, nextId);
 
                 if (needWalDeltaRecord(prevId, prevPage, null))
-                    wal.log(new PagesListSetNextRecord(cacheId, prevId, nextId));
+                    wal.log(new PagesListSetNextRecord(grpId, prevId, nextId));
 
                 nextIO.setPreviousId(nextAddr, prevId);
 
                 if (needWalDeltaRecord(nextId, nextPage, null))
-                    wal.log(new PagesListSetPreviousRecord(cacheId, nextId, prevId));
+                    wal.log(new PagesListSetPreviousRecord(grpId, nextId, prevId));
             }
             finally {
                 writeUnlock(prevId, prevPage, prevAddr, true);

http://git-wip-us.apache.org/repos/asf/ignite/blob/89e74546/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FullPageIdTable.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FullPageIdTable.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FullPageIdTable.java
index 78d83b3..19d26ff 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FullPageIdTable.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FullPageIdTable.java
@@ -45,13 +45,13 @@ public class FullPageIdTable {
     private static final long EMPTY_PAGE_ID = EMPTY_FULL_PAGE_ID.pageId();
 
     /** */
-    private static final int EMPTY_CACHE_ID = EMPTY_FULL_PAGE_ID.cacheId();
+    private static final int EMPTY_CACHE_GRP_ID = EMPTY_FULL_PAGE_ID.groupId();
 
     /** */
     private static final long REMOVED_PAGE_ID = 0x8000000000000000L;
 
     /** */
-    private static final int REMOVED_CACHE_ID = 0;
+    private static final int REMOVED_CACHE_GRP_ID = 0;
 
     /** */
     private static final int EQUAL = 0;
@@ -178,13 +178,13 @@ public class FullPageIdTable {
     /**
      * Removes key-value association for the given key.
      *
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      */
-    public void remove(int cacheId, long pageId, int tag) {
-        assert assertKey(cacheId, pageId);
+    public void remove(int grpId, long pageId, int tag) {
+        assert assertKey(grpId, pageId);
 
-        int index = removeKey(cacheId, pageId, tag);
+        int index = removeKey(grpId, pageId, tag);
 
         if (index >= 0)
             setValueAt(index, 0);
@@ -225,18 +225,18 @@ public class FullPageIdTable {
     public long clearAt(int idx, GridPredicate3<Integer, Long, Integer> pred, long absent) {
         long base = entryBase(idx);
 
-        int cacheId = GridUnsafe.getInt(base);
+        int grpId = GridUnsafe.getInt(base);
         int tag = GridUnsafe.getInt(base + 4);
         long pageId = GridUnsafe.getLong(base + 8);
 
-        if ((pageId == REMOVED_PAGE_ID && cacheId == REMOVED_CACHE_ID)
-            || (pageId == EMPTY_PAGE_ID && cacheId == EMPTY_CACHE_ID))
+        if ((pageId == REMOVED_PAGE_ID && grpId == REMOVED_CACHE_GRP_ID)
+            || (pageId == EMPTY_PAGE_ID && grpId == EMPTY_CACHE_GRP_ID))
             return absent;
 
-        if (pred.apply(cacheId, pageId, tag)) {
+        if (pred.apply(grpId, pageId, tag)) {
             long res = valueAt(idx);
 
-            setKeyAt(idx, REMOVED_CACHE_ID, REMOVED_PAGE_ID);
+            setKeyAt(idx, REMOVED_CACHE_GRP_ID, REMOVED_PAGE_ID);
             setValueAt(idx, 0);
 
             return res;
@@ -367,7 +367,7 @@ public class FullPageIdTable {
         while (++step <= maxSteps);
 
         if (foundIndex != -1) {
-            setKeyAt(foundIndex, REMOVED_CACHE_ID, REMOVED_PAGE_ID);
+            setKeyAt(foundIndex, REMOVED_CACHE_GRP_ID, REMOVED_PAGE_ID);
 
             decrementSize();
         }
@@ -382,17 +382,17 @@ public class FullPageIdTable {
     private int testKeyAt(int index, int testCacheId, long testPageId, int testTag) {
         long base = entryBase(index);
 
-        int cacheId = GridUnsafe.getInt(base);
+        int grpId = GridUnsafe.getInt(base);
         int tag = GridUnsafe.getInt(base + 4);
         long pageId = GridUnsafe.getLong(base + 8);
 
-        if (pageId == REMOVED_PAGE_ID && cacheId == REMOVED_CACHE_ID)
+        if (pageId == REMOVED_PAGE_ID && grpId == REMOVED_CACHE_GRP_ID)
             return REMOVED;
-        else if (pageId == testPageId && cacheId == testCacheId && tag >= testTag)
+        else if (pageId == testPageId && grpId == testCacheId && tag >= testTag)
             return EQUAL;
-        else if (pageId == testPageId && cacheId == testCacheId && tag < testTag)
+        else if (pageId == testPageId && grpId == testCacheId && tag < testTag)
             return OUTDATED;
-        else if (pageId == EMPTY_PAGE_ID && cacheId == EMPTY_CACHE_ID)
+        else if (pageId == EMPTY_PAGE_ID && grpId == EMPTY_CACHE_GRP_ID)
             return EMPTY;
         else
             return NOT_EQUAL;
@@ -405,34 +405,34 @@ public class FullPageIdTable {
     private boolean isValuePresentAt(final int idx) {
         long base = entryBase(idx);
 
-        int cacheId = GridUnsafe.getInt(base);
+        int grpId = GridUnsafe.getInt(base);
         long pageId = GridUnsafe.getLong(base + 8);
 
-        return !((pageId == REMOVED_PAGE_ID && cacheId == REMOVED_CACHE_ID)
-            || (pageId == EMPTY_PAGE_ID && cacheId == EMPTY_CACHE_ID));
+        return !((pageId == REMOVED_PAGE_ID && grpId == REMOVED_CACHE_GRP_ID)
+            || (pageId == EMPTY_PAGE_ID && grpId == EMPTY_CACHE_GRP_ID));
     }
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @return {@code True} if checks succeeded.
      */
-    private boolean assertKey(int cacheId, long pageId) {
-        assert cacheId != EMPTY_CACHE_ID && PageIdUtils.isEffectivePageId(pageId):
-            "cacheId=" + cacheId + ", pageId=" + U.hexLong(pageId);
+    private boolean assertKey(int grpId, long pageId) {
+        assert grpId != EMPTY_CACHE_GRP_ID && PageIdUtils.isEffectivePageId(pageId):
+            "grpId=" + grpId + ", pageId=" + U.hexLong(pageId);
 
         return true;
     }
 
     /**
      * @param index Entry index.
-     * @param cacheId Cache ID to write.
+     * @param grpId Cache group ID to write.
      * @param pageId Page ID to write.
      */
-    private void setKeyAt(int index, int cacheId, long pageId) {
+    private void setKeyAt(int index, int grpId, long pageId) {
         long base = entryBase(index);
 
-        GridUnsafe.putInt(base, cacheId);
+        GridUnsafe.putInt(base, grpId);
         GridUnsafe.putLong(base + 8, pageId);
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/89e74546/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryEx.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryEx.java
index 3246f21..7c63d41 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryEx.java
@@ -77,13 +77,13 @@ public interface PageMemoryEx extends PageMemory {
      * @see #acquirePage(int, long)
      * Will not read page from file if it is not present in memory
      *
-     * @param cacheId Cache id.
+     * @param grpId Cache group ID.
      * @param pageId Page id.
      * @param restore Get page for restore
      * @throws IgniteCheckedException If failed.
      * @return Page.
      */
-    public long acquirePage(int cacheId, long pageId, boolean restore) throws IgniteCheckedException;
+    public long acquirePage(int grpId, long pageId, boolean restore) throws IgniteCheckedException;
 
     /**
      * Heuristic method which allows a thread to check if it safe to start memory struture modifications

http://git-wip-us.apache.org/repos/asf/ignite/blob/89e74546/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java
index 6bb5c33..ab6619d 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java
@@ -714,7 +714,7 @@ public class PageMemoryImpl implements PageMemoryEx {
 
                             if (curPage != null
                                 && deltaRecord.pageId() == fullId.pageId()
-                                && deltaRecord.cacheId() == fullId.cacheId()) {
+                                && deltaRecord.groupId() == fullId.groupId()) {
                                 assert tmpAddr != null;
 
                                 deltaRecord.applyDelta(this, tmpAddr);
@@ -727,8 +727,8 @@ public class PageMemoryImpl implements PageMemoryEx {
 
             if (restored == null)
                 throw new AssertionError(String.format(
-                    "Page is broken. Can't restore it from WAL. (cacheId = %d, pageId = %X).",
-                    fullId.cacheId(), fullId.pageId()
+                    "Page is broken. Can't restore it from WAL. (grpId = %d, pageId = %X).",
+                    fullId.groupId(), fullId.pageId()
                 ));
 
             long pageAddr = writeLockPage(absPtr, fullId, false);
@@ -796,7 +796,7 @@ public class PageMemoryImpl implements PageMemoryEx {
     @Override public Integer getForCheckpoint(FullPageId fullId, ByteBuffer tmpBuf, CheckpointMetricsTracker tracker) {
         assert tmpBuf.remaining() == pageSize();
 
-        Segment seg = segment(fullId.cacheId(), fullId.pageId());
+        Segment seg = segment(fullId.groupId(), fullId.pageId());
 
         long absPtr = 0;
 
@@ -807,10 +807,10 @@ public class PageMemoryImpl implements PageMemoryEx {
         seg.readLock().lock();
 
         try {
-            tag = seg.partTag(fullId.cacheId(), PageIdUtils.partId(fullId.pageId()));
+            tag = seg.partTag(fullId.groupId(), PageIdUtils.partId(fullId.pageId()));
 
             relPtr = seg.loadedPages.get(
-                fullId.cacheId(),
+                fullId.groupId(),
                 PageIdUtils.effectivePageId(fullId.pageId()),
                 tag,
                 INVALID_REL_PTR,
@@ -839,10 +839,10 @@ public class PageMemoryImpl implements PageMemoryEx {
             try {
                 // Double-check.
                 relPtr = seg.loadedPages.get(
-                    fullId.cacheId(),
+                    fullId.groupId(),
                     PageIdUtils.effectivePageId(fullId.pageId()),
                     seg.partTag(
-                        fullId.cacheId(),
+                        fullId.groupId(),
                         PageIdUtils.partId(fullId.pageId())
                     ),
                     INVALID_REL_PTR,
@@ -855,7 +855,7 @@ public class PageMemoryImpl implements PageMemoryEx {
                 if (relPtr == OUTDATED_REL_PTR) {
                     relPtr = refreshOutdatedPage(
                         seg,
-                        fullId.cacheId(),
+                        fullId.groupId(),
                         PageIdUtils.effectivePageId(fullId.pageId()),
                         true
                     );
@@ -1245,7 +1245,7 @@ public class PageMemoryImpl implements PageMemoryEx {
      * @return {@code True} if it was added to the checkpoint list.
      */
     boolean isInCheckpoint(FullPageId pageId) {
-        Segment seg = segment(pageId.cacheId(), pageId.pageId());
+        Segment seg = segment(pageId.groupId(), pageId.pageId());
 
         Collection<FullPageId> pages0 = seg.segCheckpointPages;
 
@@ -1256,7 +1256,7 @@ public class PageMemoryImpl implements PageMemoryEx {
      * @param fullPageId Page ID to clear.
      */
     void clearCheckpoint(FullPageId fullPageId) {
-        Segment seg = segment(fullPageId.cacheId(), fullPageId.pageId());
+        Segment seg = segment(fullPageId.groupId(), fullPageId.pageId());
 
         Collection<FullPageId> pages0 = seg.segCheckpointPages;
 
@@ -1300,14 +1300,14 @@ public class PageMemoryImpl implements PageMemoryEx {
 
         if (dirty) {
             if (!wasDirty || forceAdd) {
-                boolean added = segment(pageId.cacheId(), pageId.pageId()).dirtyPages.add(pageId);
+                boolean added = segment(pageId.groupId(), pageId.pageId()).dirtyPages.add(pageId);
 
                 if (added)
                     memMetrics.incrementDirtyPages();
             }
         }
         else {
-            boolean rmv = segment(pageId.cacheId(), pageId.pageId()).dirtyPages.remove(pageId);
+            boolean rmv = segment(pageId.groupId(), pageId.pageId()).dirtyPages.remove(pageId);
 
             if (rmv)
                 memMetrics.decrementDirtyPages();
@@ -1330,12 +1330,12 @@ public class PageMemoryImpl implements PageMemoryEx {
     }
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @return Segment.
      */
-    private Segment segment(int cacheId, long pageId) {
-        int idx = segmentIndex(cacheId, pageId, segments.length);
+    private Segment segment(int grpId, long pageId) {
+        int idx = segmentIndex(grpId, pageId, segments.length);
 
         return segments[idx];
     }
@@ -1344,11 +1344,11 @@ public class PageMemoryImpl implements PageMemoryEx {
      * @param pageId Page ID.
      * @return Segment index.
      */
-    public static int segmentIndex(int cacheId, long pageId, int segments) {
+    public static int segmentIndex(int grpId, long pageId, int segments) {
         pageId = PageIdUtils.effectivePageId(pageId);
 
         // Take a prime number larger than total number of partitions.
-        int hash = U.hash(pageId * 65537 + cacheId);
+        int hash = U.hash(pageId * 65537 + grpId);
 
         return U.safeAbs(hash) % segments;
     }
@@ -1645,7 +1645,7 @@ public class PageMemoryImpl implements PageMemoryEx {
             assert writeLock().isHeldByCurrentThread();
 
             // Do not evict cache meta pages.
-            if (fullPageId.pageId() == storeMgr.metaPageId(fullPageId.cacheId()))
+            if (fullPageId.pageId() == storeMgr.metaPageId(fullPageId.groupId()))
                 return false;
 
             if (PageHeader.isAcquired(absPtr))
@@ -1662,7 +1662,7 @@ public class PageMemoryImpl implements PageMemoryEx {
                         fullPageId,
                         wrapPointer(absPtr + PAGE_OVERHEAD, pageSize()),
                         partTag(
-                            fullPageId.cacheId(),
+                            fullPageId.groupId(),
                             PageIdUtils.partId(fullPageId.pageId())
                         )
                     );
@@ -1743,10 +1743,10 @@ public class PageMemoryImpl implements PageMemoryEx {
                     assert fullId.equals(nearest.fullId()) : "Invalid page mapping [tableId=" + nearest.fullId() +
                         ", actual=" + fullId + ", nearest=" + nearest;
 
-                    boolean outdated = partTag < partTag(fullId.cacheId(), PageIdUtils.partId(fullId.pageId()));
+                    boolean outdated = partTag < partTag(fullId.groupId(), PageIdUtils.partId(fullId.pageId()));
 
                     if (outdated)
-                        return refreshOutdatedPage(this, fullId.cacheId(), fullId.pageId(), true);
+                        return refreshOutdatedPage(this, fullId.groupId(), fullId.pageId(), true);
 
                     boolean pinned = PageHeader.isAcquired(absPageAddr);
 
@@ -1797,10 +1797,10 @@ public class PageMemoryImpl implements PageMemoryEx {
                 }
 
                 loadedPages.remove(
-                    fullPageId.cacheId(),
+                    fullPageId.groupId(),
                     PageIdUtils.effectivePageId(fullPageId.pageId()),
                     partTag(
-                        fullPageId.cacheId(),
+                        fullPageId.groupId(),
                         PageIdUtils.partId(fullPageId.pageId())
                     )
                 );
@@ -1834,8 +1834,8 @@ public class PageMemoryImpl implements PageMemoryEx {
 
                 FullPageId fullId = PageHeader.fullPageId(absPageAddr);
 
-                if (partTag < partTag(fullId.cacheId(), PageIdUtils.partId(fullId.pageId())))
-                    return refreshOutdatedPage(this, fullId.cacheId(), fullId.pageId(), true);
+                if (partTag < partTag(fullId.groupId(), PageIdUtils.partId(fullId.pageId())))
+                    return refreshOutdatedPage(this, fullId.groupId(), fullId.pageId(), true);
 
                 boolean pinned = PageHeader.isAcquired(absPageAddr);
 
@@ -1851,10 +1851,10 @@ public class PageMemoryImpl implements PageMemoryEx {
 
                 if (prepareEvict(fullPageId, absEvictAddr)) {
                     loadedPages.remove(
-                        fullPageId.cacheId(),
+                        fullPageId.groupId(),
                         PageIdUtils.effectivePageId(fullPageId.pageId()),
                         partTag(
-                            fullPageId.cacheId(),
+                            fullPageId.groupId(),
                             PageIdUtils.partId(fullPageId.pageId())
                         )
                     );
@@ -1888,14 +1888,14 @@ public class PageMemoryImpl implements PageMemoryEx {
         }
 
         /**
-         * @param cacheId Cache ID.
+         * @param grpId Cache group ID.
          * @param partId Partition ID.
          * @return Partition tag.
          */
-        private int partTag(int cacheId, int partId) {
+        private int partTag(int grpId, int partId) {
             assert getReadHoldCount() > 0 || getWriteHoldCount() > 0;
 
-            Integer tag = partTagMap.get(new T2<>(cacheId, partId));
+            Integer tag = partTagMap.get(new T2<>(grpId, partId));
 
             if (tag == null)
                 return 1;
@@ -1904,14 +1904,14 @@ public class PageMemoryImpl implements PageMemoryEx {
         }
 
         /**
-         * @param cacheId Cache ID.
+         * @param grpId Cache group ID.
          * @param partId Partition ID.
          * @return New partition tag.
          */
-        private int incrementPartTag(int cacheId, int partId) {
+        private int incrementPartTag(int grpId, int partId) {
             assert getWriteHoldCount() > 0;
 
-            T2<Integer, Integer> t = new T2<>(cacheId, partId);
+            T2<Integer, Integer> t = new T2<>(grpId, partId);
 
             Integer tag = partTagMap.get(t);
 
@@ -1921,7 +1921,7 @@ public class PageMemoryImpl implements PageMemoryEx {
                 return 2;
             }
             else if (tag == Integer.MAX_VALUE) {
-                U.warn(log, "Partition tag overflow [cacheId=" + cacheId + ", partId=" + partId + "]");
+                U.warn(log, "Partition tag overflow [grpId=" + grpId + ", partId=" + partId + "]");
 
                 partTagMap.put(t, 0);
 
@@ -2224,7 +2224,7 @@ public class PageMemoryImpl implements PageMemoryEx {
         private static void fullPageId(final long absPtr, final FullPageId fullPageId) {
             pageId(absPtr, fullPageId.pageId());
 
-            pageCacheId(absPtr, fullPageId.cacheId());
+            pageCacheId(absPtr, fullPageId.groupId());
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/89e74546/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/BPlusTree.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/BPlusTree.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/BPlusTree.java
index 74d251a..c73b4c7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/BPlusTree.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/BPlusTree.java
@@ -377,7 +377,7 @@ public abstract class BPlusTree<L, T extends L> extends DataStructure implements
             byte[] newRowBytes = io.store(pageAddr, idx, newRow, null, needWal);
 
             if (needWal)
-                wal.log(new ReplaceRecord<>(cacheId, pageId, io, newRowBytes, idx));
+                wal.log(new ReplaceRecord<>(grpId, pageId, io, newRowBytes, idx));
 
             return FOUND;
         }
@@ -2200,7 +2200,7 @@ public abstract class BPlusTree<L, T extends L> extends DataStructure implements
         io.splitExistingPage(pageAddr, mid, fwdId);
 
         if (needWalDeltaRecord(pageId, page, null))
-            wal.log(new SplitExistingPageRecord(cacheId, pageId, mid, fwdId));
+            wal.log(new SplitExistingPageRecord(grpId, pageId, mid, fwdId));
 
         return res;
     }
@@ -2685,7 +2685,7 @@ public abstract class BPlusTree<L, T extends L> extends DataStructure implements
             byte[] rowBytes = io.insert(pageAddr, idx, row, null, rightId, needWal);
 
             if (needWal)
-                wal.log(new InsertRecord<>(cacheId, pageId, io, idx, rowBytes, rightId));
+                wal.log(new InsertRecord<>(grpId, pageId, io, idx, rowBytes, rightId));
         }
 
         /**
@@ -2728,7 +2728,7 @@ public abstract class BPlusTree<L, T extends L> extends DataStructure implements
                             inner(io).setLeft(fwdPageAddr, 0, rightId);
 
                             if (needWalDeltaRecord(fwdId, fwdPage, fwdPageWalPlc)) // Rare case, we can afford separate WAL record to avoid complexity.
-                                wal.log(new FixLeftmostChildRecord(cacheId, fwdId, rightId));
+                                wal.log(new FixLeftmostChildRecord(grpId, fwdId, rightId));
                         }
                     }
                     else // Insert into newly allocated forward page.
@@ -2744,7 +2744,7 @@ public abstract class BPlusTree<L, T extends L> extends DataStructure implements
                         io.setCount(pageAddr, cnt - 1);
 
                         if (needWalDeltaRecord(pageId, page, null)) // Rare case, we can afford separate WAL record to avoid complexity.
-                            wal.log(new FixCountRecord(cacheId, pageId, cnt - 1));
+                            wal.log(new FixCountRecord(grpId, pageId, cnt - 1));
                     }
 
                     if (!hadFwd && lvl == getRootLevel()) { // We are splitting root.
@@ -2775,7 +2775,7 @@ public abstract class BPlusTree<L, T extends L> extends DataStructure implements
                                     needWal);
 
                                 if (needWal)
-                                    wal.log(new NewRootInitRecord<>(cacheId, newRootId, newRootId,
+                                    wal.log(new NewRootInitRecord<>(grpId, newRootId, newRootId,
                                         inner(io), pageId, moveUpRowBytes, fwdId));
                             }
                             finally {
@@ -3656,7 +3656,7 @@ public abstract class BPlusTree<L, T extends L> extends DataStructure implements
             io.remove(pageAddr, idx, cnt);
 
             if (needWalDeltaRecord(pageId, page, walPlc))
-                wal.log(new RemoveRecord(cacheId, pageId, idx, cnt));
+                wal.log(new RemoveRecord(grpId, pageId, idx, cnt));
         }
 
         /**
@@ -3909,7 +3909,7 @@ public abstract class BPlusTree<L, T extends L> extends DataStructure implements
             leaf.io.setRemoveId(leaf.buf, rmvId);
 
             if (needWalDeltaRecord(leaf.pageId, leaf.page, leaf.walPlc))
-                wal.log(new FixRemoveId(cacheId, leaf.pageId, rmvId));
+                wal.log(new FixRemoveId(grpId, leaf.pageId, rmvId));
         }
 
         /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/89e74546/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/serializer/RecordV1Serializer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/serializer/RecordV1Serializer.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/serializer/RecordV1Serializer.java
index 0a7b3dd..663fe0c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/serializer/RecordV1Serializer.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/serializer/RecordV1Serializer.java
@@ -166,7 +166,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case PAGE_RECORD:
                 PageSnapshot snap = (PageSnapshot)record;
 
-                buf.putInt(snap.fullPageId().cacheId());
+                buf.putInt(snap.fullPageId().groupId());
                 buf.putLong(snap.fullPageId().pageId());
                 buf.put(snap.pageData());
 
@@ -182,7 +182,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case PARTITION_DESTROY:
                 PartitionDestroyRecord partDestroy = (PartitionDestroyRecord)record;
 
-                buf.putInt(partDestroy.cacheId());
+                buf.putInt(partDestroy.groupId());
                 buf.putInt(partDestroy.partitionId());
 
                 break;
@@ -190,7 +190,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case META_PAGE_INIT:
                 MetaPageInitRecord updRootsRec = (MetaPageInitRecord)record;
 
-                buf.putInt(updRootsRec.cacheId());
+                buf.putInt(updRootsRec.groupId());
                 buf.putLong(updRootsRec.pageId());
 
                 buf.putShort((short)updRootsRec.ioType());
@@ -203,7 +203,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case PARTITION_META_PAGE_UPDATE_COUNTERS:
                 MetaPageUpdatePartitionDataRecord partDataRec = (MetaPageUpdatePartitionDataRecord)record;
 
-                buf.putInt(partDataRec.cacheId());
+                buf.putInt(partDataRec.groupId());
                 buf.putLong(partDataRec.pageId());
 
                 buf.putLong(partDataRec.updateCounter());
@@ -261,7 +261,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case DATA_PAGE_INSERT_RECORD:
                 DataPageInsertRecord diRec = (DataPageInsertRecord)record;
 
-                buf.putInt(diRec.cacheId());
+                buf.putInt(diRec.groupId());
                 buf.putLong(diRec.pageId());
 
                 buf.putShort((short)diRec.payload().length);
@@ -273,7 +273,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case DATA_PAGE_UPDATE_RECORD:
                 DataPageUpdateRecord uRec = (DataPageUpdateRecord)record;
 
-                buf.putInt(uRec.cacheId());
+                buf.putInt(uRec.groupId());
                 buf.putLong(uRec.pageId());
                 buf.putInt(uRec.itemId());
 
@@ -286,7 +286,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case DATA_PAGE_INSERT_FRAGMENT_RECORD:
                 final DataPageInsertFragmentRecord difRec = (DataPageInsertFragmentRecord)record;
 
-                buf.putInt(difRec.cacheId());
+                buf.putInt(difRec.groupId());
                 buf.putLong(difRec.pageId());
 
                 buf.putLong(difRec.lastLink());
@@ -298,7 +298,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case DATA_PAGE_REMOVE_RECORD:
                 DataPageRemoveRecord drRec = (DataPageRemoveRecord)record;
 
-                buf.putInt(drRec.cacheId());
+                buf.putInt(drRec.groupId());
                 buf.putLong(drRec.pageId());
 
                 buf.put((byte)drRec.itemId());
@@ -308,7 +308,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case DATA_PAGE_SET_FREE_LIST_PAGE:
                 DataPageSetFreeListPageRecord freeListRec = (DataPageSetFreeListPageRecord)record;
 
-                buf.putInt(freeListRec.cacheId());
+                buf.putInt(freeListRec.groupId());
                 buf.putLong(freeListRec.pageId());
 
                 buf.putLong(freeListRec.freeListPage());
@@ -318,7 +318,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case INIT_NEW_PAGE_RECORD:
                 InitNewPageRecord inpRec = (InitNewPageRecord)record;
 
-                buf.putInt(inpRec.cacheId());
+                buf.putInt(inpRec.groupId());
                 buf.putLong(inpRec.pageId());
 
                 buf.putShort((short)inpRec.ioType());
@@ -330,7 +330,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case BTREE_META_PAGE_INIT_ROOT:
                 MetaPageInitRootRecord imRec = (MetaPageInitRootRecord)record;
 
-                buf.putInt(imRec.cacheId());
+                buf.putInt(imRec.groupId());
                 buf.putLong(imRec.pageId());
 
                 buf.putLong(imRec.rootId());
@@ -340,7 +340,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case BTREE_META_PAGE_INIT_ROOT2:
                 MetaPageInitRootInlineRecord imRec2 = (MetaPageInitRootInlineRecord)record;
 
-                buf.putInt(imRec2.cacheId());
+                buf.putInt(imRec2.groupId());
                 buf.putLong(imRec2.pageId());
 
                 buf.putLong(imRec2.rootId());
@@ -351,7 +351,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case BTREE_META_PAGE_ADD_ROOT:
                 MetaPageAddRootRecord arRec = (MetaPageAddRootRecord)record;
 
-                buf.putInt(arRec.cacheId());
+                buf.putInt(arRec.groupId());
                 buf.putLong(arRec.pageId());
 
                 buf.putLong(arRec.rootId());
@@ -361,7 +361,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case BTREE_META_PAGE_CUT_ROOT:
                 MetaPageCutRootRecord crRec = (MetaPageCutRootRecord)record;
 
-                buf.putInt(crRec.cacheId());
+                buf.putInt(crRec.groupId());
                 buf.putLong(crRec.pageId());
 
                 break;
@@ -369,7 +369,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case BTREE_INIT_NEW_ROOT:
                 NewRootInitRecord<?> riRec = (NewRootInitRecord<?>)record;
 
-                buf.putInt(riRec.cacheId());
+                buf.putInt(riRec.groupId());
                 buf.putLong(riRec.pageId());
 
                 buf.putLong(riRec.rootId());
@@ -385,7 +385,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case BTREE_PAGE_RECYCLE:
                 RecycleRecord recRec = (RecycleRecord)record;
 
-                buf.putInt(recRec.cacheId());
+                buf.putInt(recRec.groupId());
                 buf.putLong(recRec.pageId());
 
                 buf.putLong(recRec.newPageId());
@@ -395,7 +395,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case BTREE_PAGE_INSERT:
                 InsertRecord<?> inRec = (InsertRecord<?>)record;
 
-                buf.putInt(inRec.cacheId());
+                buf.putInt(inRec.groupId());
                 buf.putLong(inRec.pageId());
 
                 buf.putShort((short)inRec.io().getType());
@@ -410,7 +410,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case BTREE_FIX_LEFTMOST_CHILD:
                 FixLeftmostChildRecord flRec = (FixLeftmostChildRecord)record;
 
-                buf.putInt(flRec.cacheId());
+                buf.putInt(flRec.groupId());
                 buf.putLong(flRec.pageId());
 
                 buf.putLong(flRec.rightId());
@@ -420,7 +420,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case BTREE_FIX_COUNT:
                 FixCountRecord fcRec = (FixCountRecord)record;
 
-                buf.putInt(fcRec.cacheId());
+                buf.putInt(fcRec.groupId());
                 buf.putLong(fcRec.pageId());
 
                 buf.putShort((short)fcRec.count());
@@ -430,7 +430,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case BTREE_PAGE_REPLACE:
                 ReplaceRecord<?> rRec = (ReplaceRecord<?>)record;
 
-                buf.putInt(rRec.cacheId());
+                buf.putInt(rRec.groupId());
                 buf.putLong(rRec.pageId());
 
                 buf.putShort((short)rRec.io().getType());
@@ -444,7 +444,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case BTREE_PAGE_REMOVE:
                 RemoveRecord rmRec = (RemoveRecord)record;
 
-                buf.putInt(rmRec.cacheId());
+                buf.putInt(rmRec.groupId());
                 buf.putLong(rmRec.pageId());
 
                 buf.putShort((short)rmRec.index());
@@ -455,7 +455,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case BTREE_PAGE_INNER_REPLACE:
                 InnerReplaceRecord<?> irRec = (InnerReplaceRecord<?>)record;
 
-                buf.putInt(irRec.cacheId());
+                buf.putInt(irRec.groupId());
                 buf.putLong(irRec.pageId());
 
                 buf.putShort((short)irRec.destinationIndex());
@@ -468,7 +468,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case BTREE_FORWARD_PAGE_SPLIT:
                 SplitForwardPageRecord sfRec = (SplitForwardPageRecord)record;
 
-                buf.putInt(sfRec.cacheId());
+                buf.putInt(sfRec.groupId());
                 buf.putLong(sfRec.pageId());
 
                 buf.putLong(sfRec.forwardId());
@@ -483,7 +483,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case BTREE_EXISTING_PAGE_SPLIT:
                 SplitExistingPageRecord seRec = (SplitExistingPageRecord)record;
 
-                buf.putInt(seRec.cacheId());
+                buf.putInt(seRec.groupId());
                 buf.putLong(seRec.pageId());
 
                 buf.putShort((short)seRec.middleIndex());
@@ -494,7 +494,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case BTREE_PAGE_MERGE:
                 MergeRecord<?> mRec = (MergeRecord<?>)record;
 
-                buf.putInt(mRec.cacheId());
+                buf.putInt(mRec.groupId());
                 buf.putLong(mRec.pageId());
 
                 buf.putLong(mRec.parentId());
@@ -507,7 +507,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case PAGES_LIST_SET_NEXT:
                 PagesListSetNextRecord plNextRec = (PagesListSetNextRecord)record;
 
-                buf.putInt(plNextRec.cacheId());
+                buf.putInt(plNextRec.groupId());
                 buf.putLong(plNextRec.pageId());
 
                 buf.putLong(plNextRec.nextPageId());
@@ -517,7 +517,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case PAGES_LIST_SET_PREVIOUS:
                 PagesListSetPreviousRecord plPrevRec = (PagesListSetPreviousRecord)record;
 
-                buf.putInt(plPrevRec.cacheId());
+                buf.putInt(plPrevRec.groupId());
                 buf.putLong(plPrevRec.pageId());
 
                 buf.putLong(plPrevRec.previousPageId());
@@ -527,7 +527,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case PAGES_LIST_INIT_NEW_PAGE:
                 PagesListInitNewPageRecord plNewRec = (PagesListInitNewPageRecord)record;
 
-                buf.putInt(plNewRec.cacheId());
+                buf.putInt(plNewRec.groupId());
                 buf.putLong(plNewRec.pageId());
                 buf.putInt(plNewRec.ioType());
                 buf.putInt(plNewRec.ioVersion());
@@ -541,7 +541,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case PAGES_LIST_ADD_PAGE:
                 PagesListAddPageRecord plAddRec = (PagesListAddPageRecord)record;
 
-                buf.putInt(plAddRec.cacheId());
+                buf.putInt(plAddRec.groupId());
                 buf.putLong(plAddRec.pageId());
 
                 buf.putLong(plAddRec.dataPageId());
@@ -551,7 +551,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case PAGES_LIST_REMOVE_PAGE:
                 PagesListRemovePageRecord plRmvRec = (PagesListRemovePageRecord)record;
 
-                buf.putInt(plRmvRec.cacheId());
+                buf.putInt(plRmvRec.groupId());
                 buf.putLong(plRmvRec.pageId());
 
                 buf.putLong(plRmvRec.removedPageId());
@@ -561,7 +561,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case BTREE_FIX_REMOVE_ID:
                 FixRemoveId frRec = (FixRemoveId)record;
 
-                buf.putInt(frRec.cacheId());
+                buf.putInt(frRec.groupId());
                 buf.putLong(frRec.pageId());
 
                 buf.putLong(frRec.removeId());
@@ -571,7 +571,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case TRACKING_PAGE_DELTA:
                 TrackingPageDeltaRecord tpDelta = (TrackingPageDeltaRecord)record;
 
-                buf.putInt(tpDelta.cacheId());
+                buf.putInt(tpDelta.groupId());
                 buf.putLong(tpDelta.pageId());
 
                 buf.putLong(tpDelta.pageIdToMark());
@@ -583,7 +583,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case META_PAGE_UPDATE_NEXT_SNAPSHOT_ID:
                 MetaPageUpdateNextSnapshotId mpUpdateNextSnapshotId = (MetaPageUpdateNextSnapshotId)record;
 
-                buf.putInt(mpUpdateNextSnapshotId.cacheId());
+                buf.putInt(mpUpdateNextSnapshotId.groupId());
                 buf.putLong(mpUpdateNextSnapshotId.pageId());
 
                 buf.putLong(mpUpdateNextSnapshotId.nextSnapshotId());
@@ -594,7 +594,7 @@ public class RecordV1Serializer implements RecordSerializer {
                 MetaPageUpdateLastSuccessfulFullSnapshotId mpUpdateLastSuccFullSnapshotId =
                     (MetaPageUpdateLastSuccessfulFullSnapshotId)record;
 
-                buf.putInt(mpUpdateLastSuccFullSnapshotId.cacheId());
+                buf.putInt(mpUpdateLastSuccFullSnapshotId.groupId());
                 buf.putLong(mpUpdateLastSuccFullSnapshotId.pageId());
 
                 buf.putLong(mpUpdateLastSuccFullSnapshotId.lastSuccessfulFullSnapshotId());
@@ -605,7 +605,7 @@ public class RecordV1Serializer implements RecordSerializer {
                 MetaPageUpdateLastSuccessfulSnapshotId mpUpdateLastSuccSnapshotId =
                     (MetaPageUpdateLastSuccessfulSnapshotId)record;
 
-                buf.putInt(mpUpdateLastSuccSnapshotId.cacheId());
+                buf.putInt(mpUpdateLastSuccSnapshotId.groupId());
                 buf.putLong(mpUpdateLastSuccSnapshotId.pageId());
 
                 buf.putLong(mpUpdateLastSuccSnapshotId.lastSuccessfulSnapshotId());
@@ -617,7 +617,7 @@ public class RecordV1Serializer implements RecordSerializer {
                 MetaPageUpdateLastAllocatedIndex mpUpdateLastAllocatedIdx =
                         (MetaPageUpdateLastAllocatedIndex) record;
 
-                buf.putInt(mpUpdateLastAllocatedIdx.cacheId());
+                buf.putInt(mpUpdateLastAllocatedIdx.groupId());
                 buf.putLong(mpUpdateLastAllocatedIdx.pageId());
 
                 buf.putInt(mpUpdateLastAllocatedIdx.lastAllocatedIndex());
@@ -627,7 +627,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case PART_META_UPDATE_STATE:
                 PartitionMetaStateRecord partMetaStateRecord = (PartitionMetaStateRecord) record;
 
-                buf.putInt(partMetaStateRecord.cacheId());
+                buf.putInt(partMetaStateRecord.groupId());
 
                 buf.putInt(partMetaStateRecord.partitionId());
 
@@ -640,7 +640,7 @@ public class RecordV1Serializer implements RecordSerializer {
             case PAGE_LIST_META_RESET_COUNT_RECORD:
                 PageListMetaResetCountRecord pageListMetaResetCntRecord = (PageListMetaResetCountRecord) record;
 
-                buf.putInt(pageListMetaResetCntRecord.cacheId());
+                buf.putInt(pageListMetaResetCntRecord.groupId());
                 buf.putLong(pageListMetaResetCntRecord.pageId());
 
                 break;

http://git-wip-us.apache.org/repos/asf/ignite/blob/89e74546/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoLoadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoLoadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoLoadSelfTest.java
index 02c521e..5bef372 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoLoadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoLoadSelfTest.java
@@ -64,10 +64,10 @@ public class PageMemoryNoLoadSelfTest extends GridCommonAbstractTest {
             FullPageId fullId1 = allocatePage(mem);
             FullPageId fullId2 = allocatePage(mem);
 
-            long page1 = mem.acquirePage(fullId1.cacheId(), fullId1.pageId());
+            long page1 = mem.acquirePage(fullId1.groupId(), fullId1.pageId());
 
             try {
-                long page2 = mem.acquirePage(fullId2.cacheId(), fullId2.pageId());
+                long page2 = mem.acquirePage(fullId2.groupId(), fullId2.pageId());
 
                 info("Allocated pages [page1Id=" + fullId1.pageId() + ", page1=" + page1 +
                     ", page2Id=" + fullId2.pageId() + ", page2=" + page2 + ']');
@@ -84,11 +84,11 @@ public class PageMemoryNoLoadSelfTest extends GridCommonAbstractTest {
                     readPage(mem, fullId2.pageId(), page2, 2);
                 }
                 finally {
-                    mem.releasePage(fullId2.cacheId(), fullId2.pageId(), page2);
+                    mem.releasePage(fullId2.groupId(), fullId2.pageId(), page2);
                 }
             }
             finally {
-                mem.releasePage(fullId1.cacheId(), fullId1.pageId(), page1);
+                mem.releasePage(fullId1.groupId(), fullId1.pageId(), page1);
             }
         }
         finally {
@@ -139,7 +139,7 @@ public class PageMemoryNoLoadSelfTest extends GridCommonAbstractTest {
 
                 pages.add(fullId);
 
-                long page = mem.acquirePage(fullId.cacheId(), fullId.pageId());
+                long page = mem.acquirePage(fullId.groupId(), fullId.pageId());
 
                 try {
                     if (i % 64 == 0)
@@ -148,14 +148,14 @@ public class PageMemoryNoLoadSelfTest extends GridCommonAbstractTest {
                     writePage(mem, fullId.pageId(), page, i + 1);
                 }
                 finally {
-                    mem.releasePage(fullId.cacheId(), fullId.pageId(), page);
+                    mem.releasePage(fullId.groupId(), fullId.pageId(), page);
                 }
             }
 
             for (int i = 0; i < pagesCnt; i++) {
                 FullPageId fullId = pages.get(i);
 
-                long page = mem.acquirePage(fullId.cacheId(), fullId.pageId());
+                long page = mem.acquirePage(fullId.groupId(), fullId.pageId());
 
                 try {
                     if (i % 64 == 0)
@@ -164,7 +164,7 @@ public class PageMemoryNoLoadSelfTest extends GridCommonAbstractTest {
                     readPage(mem, fullId.pageId(), page, i + 1);
                 }
                 finally {
-                    mem.releasePage(fullId.cacheId(), fullId.pageId(), page);
+                    mem.releasePage(fullId.groupId(), fullId.pageId(), page);
                 }
             }
         }
@@ -190,7 +190,7 @@ public class PageMemoryNoLoadSelfTest extends GridCommonAbstractTest {
                 handles.add(allocatePage(mem));
 
             for (FullPageId fullId : handles)
-                mem.freePage(fullId.cacheId(), fullId.pageId());
+                mem.freePage(fullId.groupId(), fullId.pageId());
 
             for (int i = 0; i < pages; i++)
                 assertFalse(handles.add(allocatePage(mem)));
@@ -219,9 +219,9 @@ public class PageMemoryNoLoadSelfTest extends GridCommonAbstractTest {
 
             // Check that initial pages are accessible.
             for (FullPageId id : old) {
-                long pageApsPtr = mem.acquirePage(id.cacheId(), id.pageId());
+                long pageApsPtr = mem.acquirePage(id.groupId(), id.pageId());
                 try {
-                    long pageAddr = mem.writeLock(id.cacheId(), id.pageId(), pageApsPtr);
+                    long pageAddr = mem.writeLock(id.groupId(), id.pageId(), pageApsPtr);
 
                     assertNotNull(pageAddr);
 
@@ -230,47 +230,47 @@ public class PageMemoryNoLoadSelfTest extends GridCommonAbstractTest {
 
                         PageIO.setPageId(pageAddr, updId);
 
-                        updated.add(new FullPageId(updId, id.cacheId()));
+                        updated.add(new FullPageId(updId, id.groupId()));
                     }
                     finally {
-                        mem.writeUnlock(id.cacheId(), id.pageId(), pageApsPtr, null, true);
+                        mem.writeUnlock(id.groupId(), id.pageId(), pageApsPtr, null, true);
                     }
                 }
                 finally {
-                    mem.releasePage(id.cacheId(), id.pageId(), pageApsPtr);
+                    mem.releasePage(id.groupId(), id.pageId(), pageApsPtr);
                 }
             }
 
             // Check that updated pages are inaccessible using old IDs.
             for (FullPageId id : old) {
-                long pageApsPtr = mem.acquirePage(id.cacheId(), id.pageId());
+                long pageApsPtr = mem.acquirePage(id.groupId(), id.pageId());
                 try {
-                    long pageAddr = mem.writeLock(id.cacheId(), id.pageId(), pageApsPtr);
+                    long pageAddr = mem.writeLock(id.groupId(), id.pageId(), pageApsPtr);
 
                     if (pageAddr != 0L) {
-                        mem.writeUnlock(id.cacheId(), id.pageId(), pageApsPtr, null, false);
+                        mem.writeUnlock(id.groupId(), id.pageId(), pageApsPtr, null, false);
 
                         fail("Was able to acquire page write lock.");
                     }
 
-                    mem.readLock(id.cacheId(), id.pageId(), pageApsPtr);
+                    mem.readLock(id.groupId(), id.pageId(), pageApsPtr);
 
                     if (pageAddr != 0) {
-                        mem.readUnlock(id.cacheId(), id.pageId(), pageApsPtr);
+                        mem.readUnlock(id.groupId(), id.pageId(), pageApsPtr);
 
                         fail("Was able to acquire page read lock.");
                     }
                 }
                 finally {
-                    mem.releasePage(id.cacheId(), id.pageId(), pageApsPtr);
+                    mem.releasePage(id.groupId(), id.pageId(), pageApsPtr);
                 }
             }
 
             // Check that updated pages are accessible using new IDs.
             for (FullPageId id : updated) {
-                long pageApsPtr = mem.acquirePage(id.cacheId(), id.pageId());
+                long pageApsPtr = mem.acquirePage(id.groupId(), id.pageId());
                 try {
-                    long pageAddr = mem.writeLock(id.cacheId(), id.pageId(), pageApsPtr);
+                    long pageAddr = mem.writeLock(id.groupId(), id.pageId(), pageApsPtr);
 
                     assertNotSame(0L, pageAddr);
 
@@ -278,10 +278,10 @@ public class PageMemoryNoLoadSelfTest extends GridCommonAbstractTest {
                         assertEquals(id.pageId(), PageIO.getPageId(pageAddr));
                     }
                     finally {
-                        mem.writeUnlock(id.cacheId(), id.pageId(), pageApsPtr, null, false);
+                        mem.writeUnlock(id.groupId(), id.pageId(), pageApsPtr, null, false);
                     }
 
-                    pageAddr = mem.readLock(id.cacheId(), id.pageId(), pageApsPtr);
+                    pageAddr = mem.readLock(id.groupId(), id.pageId(), pageApsPtr);
 
                     assertNotSame(0L, pageAddr);
 
@@ -289,11 +289,11 @@ public class PageMemoryNoLoadSelfTest extends GridCommonAbstractTest {
                         assertEquals(id.pageId(), PageIO.getPageId(pageAddr));
                     }
                     finally {
-                        mem.readUnlock(id.cacheId(), id.pageId(), pageApsPtr);
+                        mem.readUnlock(id.groupId(), id.pageId(), pageApsPtr);
                     }
                 }
                 finally {
-                    mem.releasePage(id.cacheId(), id.pageId(), pageApsPtr);
+                    mem.releasePage(id.groupId(), id.pageId(), pageApsPtr);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/89e74546/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRecoveryAfterFileCorruptionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRecoveryAfterFileCorruptionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRecoveryAfterFileCorruptionTest.java
index 6847482..1e845f7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRecoveryAfterFileCorruptionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRecoveryAfterFileCorruptionTest.java
@@ -214,18 +214,18 @@ public class IgnitePdsRecoveryAfterFileCorruptionTest extends GridCommonAbstract
         PageMemory mem = shared.database().memoryPolicy(null).pageMemory();
 
         for (FullPageId fullId : pages) {
-            long page = mem.acquirePage(fullId.cacheId(), fullId.pageId());
+            long page = mem.acquirePage(fullId.groupId(), fullId.pageId());
 
             try {
-                long pageAddr = mem.readLock(fullId.cacheId(), fullId.pageId(), page);
+                long pageAddr = mem.readLock(fullId.groupId(), fullId.pageId(), page);
 
                 for (int j = PageIO.COMMON_HEADER_END; j < mem.pageSize(); j += 4)
                     assertEquals(j + (int)fullId.pageId(), PageUtils.getInt(pageAddr, j));
 
-                mem.readUnlock(fullId.cacheId(), fullId.pageId(), page);
+                mem.readUnlock(fullId.groupId(), fullId.pageId(), page);
             }
             finally {
-                mem.releasePage(fullId.cacheId(), fullId.pageId(), page);
+                mem.releasePage(fullId.groupId(), fullId.pageId(), page);
             }
         }
     }
@@ -253,10 +253,10 @@ public class IgnitePdsRecoveryAfterFileCorruptionTest extends GridCommonAbstract
         for (int i = 0; i < totalPages; i++) {
             FullPageId fullId = pages[i];
 
-            long page = mem.acquirePage(fullId.cacheId(), fullId.pageId());
+            long page = mem.acquirePage(fullId.groupId(), fullId.pageId());
 
             try {
-                long pageAddr = mem.writeLock(fullId.cacheId(), fullId.pageId(), page);
+                long pageAddr = mem.writeLock(fullId.groupId(), fullId.pageId(), page);
 
                 PageIO.setPageId(pageAddr, fullId.pageId());
 
@@ -265,11 +265,11 @@ public class IgnitePdsRecoveryAfterFileCorruptionTest extends GridCommonAbstract
                         PageUtils.putInt(pageAddr, j, j + (int)fullId.pageId());
                 }
                 finally {
-                    mem.writeUnlock(fullId.cacheId(), fullId.pageId(), page, null, true);
+                    mem.writeUnlock(fullId.groupId(), fullId.pageId(), page, null, true);
                 }
             }
             finally {
-                mem.releasePage(fullId.cacheId(), fullId.pageId(), page);
+                mem.releasePage(fullId.groupId(), fullId.pageId(), page);
             }
         }
 
@@ -341,17 +341,17 @@ public class IgnitePdsRecoveryAfterFileCorruptionTest extends GridCommonAbstract
         wal.fsync(wal.log(new CheckpointRecord(null)));
 
         for (FullPageId fullId : pages) {
-            long page = mem.acquirePage(fullId.cacheId(), fullId.pageId());
+            long page = mem.acquirePage(fullId.groupId(), fullId.pageId());
 
             try {
                 assertFalse("Page has a temp heap copy after the last checkpoint: [cacheId=" +
-                    fullId.cacheId() + ", pageId=" + fullId.pageId() + "]", mem.hasTempCopy(page));
+                    fullId.groupId() + ", pageId=" + fullId.pageId() + "]", mem.hasTempCopy(page));
 
                 assertFalse("Page is dirty after the last checkpoint: [cacheId=" +
-                    fullId.cacheId() + ", pageId=" + fullId.pageId() + "]", mem.isDirty(fullId.cacheId(), fullId.pageId(), page));
+                    fullId.groupId() + ", pageId=" + fullId.pageId() + "]", mem.isDirty(fullId.groupId(), fullId.pageId(), page));
             }
             finally {
-                mem.releasePage(fullId.cacheId(), fullId.pageId(), page);
+                mem.releasePage(fullId.groupId(), fullId.pageId(), page);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/89e74546/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java
index e70c56e..297e69f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java
@@ -228,9 +228,9 @@ public class IgnitePdsCheckpointSimulationWithRealCpDisabledTest extends GridCom
 
             // Check getForInitialWrite methods.
             for (FullPageId fullId : initWrites) {
-                long page = mem.acquirePage(fullId.cacheId(), fullId.pageId());
+                long page = mem.acquirePage(fullId.groupId(), fullId.pageId());
                 try {
-                    long pageAddr = mem.writeLock(fullId.cacheId(), fullId.pageId(), page);
+                    long pageAddr = mem.writeLock(fullId.groupId(), fullId.pageId(), page);
 
                     try {
                         DataPageIO.VERSIONS.latest().initNewPage(pageAddr, fullId.pageId(), mem.pageSize());
@@ -239,11 +239,11 @@ public class IgnitePdsCheckpointSimulationWithRealCpDisabledTest extends GridCom
                             PageUtils.putByte(pageAddr, i, (byte)0xAB);
                     }
                     finally {
-                        mem.writeUnlock(fullId.cacheId(), fullId.pageId(), page, null, true);
+                        mem.writeUnlock(fullId.groupId(), fullId.pageId(), page, null, true);
                     }
                 }
                 finally {
-                    mem.releasePage(fullId.cacheId(), fullId.pageId(), page);
+                    mem.releasePage(fullId.groupId(), fullId.pageId(), page);
                 }
             }
 
@@ -527,26 +527,26 @@ public class IgnitePdsCheckpointSimulationWithRealCpDisabledTest extends GridCom
                 pageIds[i] = new FullPageId(mem.allocatePage(cacheId, 0, PageIdAllocator.FLAG_DATA), cacheId);
 
             for (FullPageId fullId : pageIds) {
-                long page = mem.acquirePage(fullId.cacheId(), fullId.pageId());
+                long page = mem.acquirePage(fullId.groupId(), fullId.pageId());
 
                 try {
-                    assertTrue(mem.isDirty(fullId.cacheId(), fullId.pageId(), page)); //page is dirty right after allocation
+                    assertTrue(mem.isDirty(fullId.groupId(), fullId.pageId(), page)); //page is dirty right after allocation
 
-                    long pageAddr = mem.writeLock(fullId.cacheId(), fullId.pageId(), page);
+                    long pageAddr = mem.writeLock(fullId.groupId(), fullId.pageId(), page);
 
                     PageIO.setPageId(pageAddr, fullId.pageId());
 
                     try {
-                        assertTrue(mem.isDirty(fullId.cacheId(), fullId.pageId(), page));
+                        assertTrue(mem.isDirty(fullId.groupId(), fullId.pageId(), page));
                     }
                     finally {
-                        mem.writeUnlock(fullId.cacheId(), fullId.pageId(),page, null,true);
+                        mem.writeUnlock(fullId.groupId(), fullId.pageId(),page, null,true);
                     }
 
-                    assertTrue(mem.isDirty(fullId.cacheId(), fullId.pageId(), page));
+                    assertTrue(mem.isDirty(fullId.groupId(), fullId.pageId(), page));
                 }
                 finally {
-                    mem.releasePage(fullId.cacheId(), fullId.pageId(), page);
+                    mem.releasePage(fullId.groupId(), fullId.pageId(), page);
                 }
             }
         }
@@ -564,24 +564,24 @@ public class IgnitePdsCheckpointSimulationWithRealCpDisabledTest extends GridCom
 
                 ByteBuffer buf = ByteBuffer.allocate(mem.pageSize());
 
-                long page = mem.acquirePage(fullId.cacheId(), fullId.pageId());
+                long page = mem.acquirePage(fullId.groupId(), fullId.pageId());
 
                 try {
-                    assertTrue(mem.isDirty(fullId.cacheId(), fullId.pageId(), page));
+                    assertTrue(mem.isDirty(fullId.groupId(), fullId.pageId(), page));
 
-                    long pageAddr = mem.writeLock(fullId.cacheId(), fullId.pageId(), page);
+                    long pageAddr = mem.writeLock(fullId.groupId(), fullId.pageId(), page);
 
                     try {
-                        assertFalse(mem.isDirty(fullId.cacheId(), fullId.pageId(), page));
+                        assertFalse(mem.isDirty(fullId.groupId(), fullId.pageId(), page));
 
                         for (int i = PageIO.COMMON_HEADER_END; i < mem.pageSize(); i++)
                             PageUtils.putByte(pageAddr, i, (byte)1);
                     }
                     finally {
-                        mem.writeUnlock(fullId.cacheId(), fullId.pageId(), page, null, true);
+                        mem.writeUnlock(fullId.groupId(), fullId.pageId(), page, null, true);
                     }
 
-                    assertTrue(mem.isDirty(fullId.cacheId(), fullId.pageId(), page));
+                    assertTrue(mem.isDirty(fullId.groupId(), fullId.pageId(), page));
 
                     buf.rewind();
 
@@ -593,7 +593,7 @@ public class IgnitePdsCheckpointSimulationWithRealCpDisabledTest extends GridCom
                         assertEquals((byte)0, buf.get());
                 }
                 finally {
-                    mem.releasePage(fullId.cacheId(), fullId.pageId(), page);
+                    mem.releasePage(fullId.groupId(), fullId.pageId(), page);
                 }
             }
         }
@@ -604,12 +604,12 @@ public class IgnitePdsCheckpointSimulationWithRealCpDisabledTest extends GridCom
         mem.finishCheckpoint();
 
         for (FullPageId fullId : pageIds) {
-            long page = mem.acquirePage(fullId.cacheId(), fullId.pageId());
+            long page = mem.acquirePage(fullId.groupId(), fullId.pageId());
             try {
-                assertTrue(mem.isDirty(fullId.cacheId(), fullId.pageId(), page));
+                assertTrue(mem.isDirty(fullId.groupId(), fullId.pageId(), page));
             }
             finally {
-                mem.releasePage(fullId.cacheId(), fullId.pageId(), page);
+                mem.releasePage(fullId.groupId(), fullId.pageId(), page);
             }
         }
     }
@@ -618,9 +618,9 @@ public class IgnitePdsCheckpointSimulationWithRealCpDisabledTest extends GridCom
      * @throws Exception if failed.
      */
     private void writePageData(FullPageId fullId, PageMemory mem) throws Exception {
-        long page = mem.acquirePage(fullId.cacheId(), fullId.pageId());
+        long page = mem.acquirePage(fullId.groupId(), fullId.pageId());
         try {
-            long pageAddr = mem.writeLock(fullId.cacheId(), fullId.pageId(), page);
+            long pageAddr = mem.writeLock(fullId.groupId(), fullId.pageId(), page);
 
             try {
                 DataPageIO.VERSIONS.latest().initNewPage(pageAddr, fullId.pageId(), mem.pageSize());
@@ -631,11 +631,11 @@ public class IgnitePdsCheckpointSimulationWithRealCpDisabledTest extends GridCom
                     PageUtils.putByte(pageAddr, i, (byte)rnd.nextInt(255));
             }
             finally {
-                mem.writeUnlock(fullId.cacheId(), fullId.pageId(), page, null, true);
+                mem.writeUnlock(fullId.groupId(), fullId.pageId(), page, null, true);
             }
         }
         finally {
-            mem.releasePage(fullId.cacheId(), fullId.pageId(), page);
+            mem.releasePage(fullId.groupId(), fullId.pageId(), page);
         }
     }
 
@@ -693,9 +693,9 @@ public class IgnitePdsCheckpointSimulationWithRealCpDisabledTest extends GridCom
 
             assertNotNull("Missing WAL record for a written page: " + fullId, walData);
 
-            long page = mem.acquirePage(fullId.cacheId(), fullId.pageId());
+            long page = mem.acquirePage(fullId.groupId(), fullId.pageId());
             try {
-                long pageAddr = mem.readLock(fullId.cacheId(), fullId.pageId(), page);
+                long pageAddr = mem.readLock(fullId.groupId(), fullId.pageId(), page);
 
                 try {
                     for (int i = PageIO.COMMON_HEADER_END; i < mem.pageSize(); i++) {
@@ -707,11 +707,11 @@ public class IgnitePdsCheckpointSimulationWithRealCpDisabledTest extends GridCom
                     }
                 }
                 finally {
-                    mem.readUnlock(fullId.cacheId(), fullId.pageId(), page);
+                    mem.readUnlock(fullId.groupId(), fullId.pageId(), page);
                 }
             }
             finally {
-                mem.releasePage(fullId.cacheId(), fullId.pageId(), page);
+                mem.releasePage(fullId.groupId(), fullId.pageId(), page);
             }
         }
     }
@@ -772,10 +772,10 @@ public class IgnitePdsCheckpointSimulationWithRealCpDisabledTest extends GridCom
                         ig.context().cache().context().database().checkpointReadLock();
 
                         try {
-                            long page = mem.acquirePage(fullId.cacheId(), fullId.pageId());
+                            long page = mem.acquirePage(fullId.groupId(), fullId.pageId());
 
                             try {
-                                long pageAddr = mem.writeLock(fullId.cacheId(), fullId.pageId(), page);
+                                long pageAddr = mem.writeLock(fullId.groupId(), fullId.pageId(), page);
 
                                 PageIO.setPageId(pageAddr, fullId.pageId());
 
@@ -813,11 +813,11 @@ public class IgnitePdsCheckpointSimulationWithRealCpDisabledTest extends GridCom
                                     resMap.put(fullId, state);
                                 }
                                 finally {
-                                    mem.writeUnlock(fullId.cacheId(), fullId.pageId(),page, null,true);
+                                    mem.writeUnlock(fullId.groupId(), fullId.pageId(),page, null,true);
                                 }
                             }
                             finally {
-                                mem.releasePage(fullId.cacheId(), fullId.pageId(),page);}
+                                mem.releasePage(fullId.groupId(), fullId.pageId(),page);}
                             }
                             finally {
                                 ig.context().cache().context().database().checkpointReadUnlock();
@@ -958,17 +958,17 @@ public class IgnitePdsCheckpointSimulationWithRealCpDisabledTest extends GridCom
 
         for (FullPageId fullId : pages) {
 
-            long page = mem.acquirePage(fullId.cacheId(), fullId.pageId());
+            long page = mem.acquirePage(fullId.groupId(), fullId.pageId());
 
             try {
                 assertFalse("Page has a temp heap copy after the last checkpoint: [cacheId=" +
-                    fullId.cacheId() + ", pageId=" + fullId.pageId() + "]", mem.hasTempCopy(page));
+                    fullId.groupId() + ", pageId=" + fullId.pageId() + "]", mem.hasTempCopy(page));
 
                 assertFalse("Page is dirty after the last checkpoint: [cacheId=" +
-                    fullId.cacheId() + ", pageId=" + fullId.pageId() + "]", mem.isDirty(fullId.cacheId(), fullId.pageId(), page));
+                    fullId.groupId() + ", pageId=" + fullId.pageId() + "]", mem.isDirty(fullId.groupId(), fullId.pageId(), page));
             }
             finally {
-                mem.releasePage(fullId.cacheId(), fullId.pageId(), page);
+                mem.releasePage(fullId.groupId(), fullId.pageId(), page);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/89e74546/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsEvictionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsEvictionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsEvictionTest.java
index ea4a0e9..d7790c3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsEvictionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsEvictionTest.java
@@ -203,10 +203,10 @@ public class IgnitePdsEvictionTest extends GridCommonAbstractTest {
                     try {
                         FullPageId fullId = pageIds.get(i);
 
-                        long page = memory.acquirePage(fullId.cacheId(), fullId.pageId());
+                        long page = memory.acquirePage(fullId.groupId(), fullId.pageId());
 
                         try {
-                            final long pageAddr = memory.writeLock(fullId.cacheId(), fullId.pageId(), page);
+                            final long pageAddr = memory.writeLock(fullId.groupId(), fullId.pageId(), page);
 
                             try {
                                 PageIO.setPageId(pageAddr, fullId.pageId());
@@ -214,11 +214,11 @@ public class IgnitePdsEvictionTest extends GridCommonAbstractTest {
                                 PageUtils.putLong(pageAddr, PageIO.COMMON_HEADER_END, i * 2);
                             }
                             finally {
-                                memory.writeUnlock(fullId.cacheId(), fullId.pageId(), page, null, true);
+                                memory.writeUnlock(fullId.groupId(), fullId.pageId(), page, null, true);
                             }
                         }
                         finally {
-                            memory.releasePage(fullId.cacheId(), fullId.pageId(), page);
+                            memory.releasePage(fullId.groupId(), fullId.pageId(), page);
                         }
                     }
                     finally {
@@ -252,19 +252,19 @@ public class IgnitePdsEvictionTest extends GridCommonAbstractTest {
                     try {
                         final FullPageId fullId = pageIds.get(i);
 
-                        long page = memory.acquirePage(fullId.cacheId(), fullId.pageId());
+                        long page = memory.acquirePage(fullId.groupId(), fullId.pageId());
                         try {
-                            final long pageAddr = memory.readLock(fullId.cacheId(), fullId.pageId(), page);
+                            final long pageAddr = memory.readLock(fullId.groupId(), fullId.pageId(), page);
 
                             try {
                                 assertEquals(i * 2, PageUtils.getLong(pageAddr, PageIO.COMMON_HEADER_END));
                             }
                             finally {
-                                memory.readUnlock(fullId.cacheId(), fullId.pageId(), page);
+                                memory.readUnlock(fullId.groupId(), fullId.pageId(), page);
                             }
                         }
                         finally {
-                            memory.releasePage(fullId.cacheId(), fullId.pageId(), page);
+                            memory.releasePage(fullId.groupId(), fullId.pageId(), page);
                         }
                     }
                     finally {

http://git-wip-us.apache.org/repos/asf/ignite/blob/89e74546/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryTest.java
index 843fb5b..c5d6a8b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryTest.java
@@ -934,7 +934,7 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
                     else if (rec instanceof PageDeltaRecord) {
                         PageDeltaRecord delta = (PageDeltaRecord)rec;
 
-                        FullPageId fullId = new FullPageId(delta.pageId(), delta.cacheId());
+                        FullPageId fullId = new FullPageId(delta.pageId(), delta.groupId());
 
                         byte[] pageData = rolledPages.get(fullId);
 
@@ -976,10 +976,10 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
                 ignite0.context().cache().context().database().checkpointReadLock();
 
                 try {
-                    long page = pageMem.acquirePage(fullId.cacheId(), fullId.pageId(), true);
+                    long page = pageMem.acquirePage(fullId.groupId(), fullId.pageId(), true);
 
                     try {
-                        long buf = pageMem.writeLock(fullId.cacheId(), fullId.pageId(), page, true);
+                        long buf = pageMem.writeLock(fullId.groupId(), fullId.pageId(), page, true);
 
                         try {
                             byte[] data = entry.getValue();
@@ -992,11 +992,11 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
                             }
                         }
                         finally {
-                            pageMem.writeUnlock(fullId.cacheId(), fullId.pageId(), page, null, false, true);
+                            pageMem.writeUnlock(fullId.groupId(), fullId.pageId(), page, null, false, true);
                         }
                     }
                     finally {
-                        pageMem.releasePage(fullId.cacheId(), fullId.pageId(), page);
+                        pageMem.releasePage(fullId.groupId(), fullId.pageId(), page);
                     }
                 }
                 finally {


Mime
View raw message