ignite-5075 Rename cacheId -> groupId

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

Branch: refs/heads/master
Commit: f2568b76417aebc0e3c20003a8120b2d2adab3eb
Parents: 5686810
Author: sboikov <sboi...@gridgain.com>
Authored: Mon Jul 10 14:41:04 2017 +0300
Committer: sboikov <sboi...@gridgain.com>
Committed: Mon Jul 10 14:41:04 2017 +0300

----------------------------------------------------------------------
 .../ignite/internal/pagemem/FullPageId.java     | 32 ++++-----
 .../ignite/internal/pagemem/PageSupport.java    | 36 +++++-----
 .../pagemem/store/IgnitePageStoreManager.java   | 40 +++++------
 .../delta/DataPageInsertFragmentRecord.java     |  6 +-
 .../wal/record/delta/DataPageInsertRecord.java  |  6 +-
 .../wal/record/delta/DataPageRemoveRecord.java  |  6 +-
 .../delta/DataPageSetFreeListPageRecord.java    |  6 +-
 .../wal/record/delta/DataPageUpdateRecord.java  |  6 +-
 .../wal/record/delta/FixCountRecord.java        |  6 +-
 .../record/delta/FixLeftmostChildRecord.java    |  6 +-
 .../pagemem/wal/record/delta/FixRemoveId.java   |  6 +-
 .../wal/record/delta/InitNewPageRecord.java     |  6 +-
 .../wal/record/delta/InnerReplaceRecord.java    |  6 +-
 .../pagemem/wal/record/delta/InsertRecord.java  |  6 +-
 .../pagemem/wal/record/delta/MergeRecord.java   |  6 +-
 .../wal/record/delta/MetaPageAddRootRecord.java |  6 +-
 .../wal/record/delta/MetaPageCutRootRecord.java |  6 +-
 .../wal/record/delta/MetaPageInitRecord.java    |  6 +-
 .../delta/MetaPageInitRootInlineRecord.java     |  6 +-
 .../record/delta/MetaPageInitRootRecord.java    |  4 +-
 .../delta/MetaPageUpdateLastAllocatedIndex.java |  4 +-
 ...aPageUpdateLastSuccessfulFullSnapshotId.java |  4 +-
 .../MetaPageUpdateLastSuccessfulSnapshotId.java |  4 +-
 .../delta/MetaPageUpdateNextSnapshotId.java     |  4 +-
 .../MetaPageUpdatePartitionDataRecord.java      |  6 +-
 .../wal/record/delta/NewRootInitRecord.java     |  6 +-
 .../wal/record/delta/PageDeltaRecord.java       | 14 ++--
 .../delta/PageListMetaResetCountRecord.java     |  6 +-
 .../record/delta/PagesListAddPageRecord.java    |  6 +-
 .../delta/PagesListInitNewPageRecord.java       |  6 +-
 .../record/delta/PagesListRemovePageRecord.java |  2 +-
 .../record/delta/PagesListSetNextRecord.java    |  6 +-
 .../delta/PagesListSetPreviousRecord.java       |  6 +-
 .../record/delta/PartitionDestroyRecord.java    | 20 +++---
 .../record/delta/PartitionMetaStateRecord.java  | 16 ++---
 .../pagemem/wal/record/delta/RecycleRecord.java |  6 +-
 .../pagemem/wal/record/delta/RemoveRecord.java  |  6 +-
 .../pagemem/wal/record/delta/ReplaceRecord.java |  6 +-
 .../record/delta/SplitExistingPageRecord.java   |  6 +-
 .../record/delta/SplitForwardPageRecord.java    |  6 +-
 .../record/delta/TrackingPageDeltaRecord.java   |  6 +-
 .../cache/persistence/DataStructure.java        | 46 ++++++------
 .../GridCacheDatabaseSharedManager.java         | 38 +++++-----
 .../persistence/GridCacheOffheapManager.java    |  4 +-
 .../cache/persistence/MetadataStorage.java      |  2 +-
 .../persistence/file/FilePageStoreManager.java  | 34 ++++-----
 .../persistence/freelist/FreeListImpl.java      |  6 +-
 .../cache/persistence/freelist/PagesList.java   | 36 +++++-----
 .../persistence/pagemem/FullPageIdTable.java    | 54 +++++++-------
 .../cache/persistence/pagemem/PageMemoryEx.java |  4 +-
 .../persistence/pagemem/PageMemoryImpl.java     | 72 +++++++++----------
 .../cache/persistence/tree/BPlusTree.java       | 16 ++---
 .../wal/serializer/RecordV1Serializer.java      | 76 ++++++++++----------
 .../pagemem/impl/PageMemoryNoLoadSelfTest.java  | 52 +++++++-------
 ...gnitePdsRecoveryAfterFileCorruptionTest.java | 24 +++----
 ...ckpointSimulationWithRealCpDisabledTest.java | 74 +++++++++----------
 .../db/file/IgnitePdsEvictionTest.java          | 16 ++---
 .../db/wal/IgniteWalRecoveryTest.java           | 10 +--
 .../pagemem/NoOpPageStoreManager.java           | 22 +++---
 59 files changed, 470 insertions(+), 470 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/FullPageId.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/FullPageId.java 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/FullPageId.java
index 20677ea..00f52c1 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/FullPageId.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/FullPageId.java
@@ -56,28 +56,28 @@ public class FullPageId {
     private final long effectivePageId;
 
     /** */
-    private final int cacheId;
+    private final int grpId;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @return Hash code.
      */
-    public static int hashCode(int cacheId, long pageId) {
+    public static int hashCode(int grpId, long pageId) {
         long effectiveId = PageIdUtils.effectivePageId(pageId);
 
-        return U.hash(hashCode0(cacheId, effectiveId));
+        return U.hash(hashCode0(grpId, effectiveId));
     }
 
     /**
      * Will not clear link bits.
      *
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param effectivePageId Effective page ID.
      * @return Hash code.
      */
-    private static int hashCode0(int cacheId, long effectivePageId) {
-        return (int)(mix64(effectivePageId) ^ mix32(cacheId));
+    private static int hashCode0(int grpId, long effectivePageId) {
+        return (int)(mix64(effectivePageId) ^ mix32(grpId));
     }
 
     /**
@@ -107,11 +107,11 @@ public class FullPageId {
     }
     /**
      * @param pageId Page ID.
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      */
-    public FullPageId(long pageId, int cacheId) {
+    public FullPageId(long pageId, int grpId) {
         this.pageId = pageId;
-        this.cacheId = cacheId;
+        this.grpId = grpId;
 
         effectivePageId = PageIdUtils.effectivePageId(pageId);
     }
@@ -124,10 +124,10 @@ public class FullPageId {
     }
 
     /**
-     * @return Cache ID.
+     * @return Cache group ID.
      */
-    public int cacheId() {
-        return cacheId;
+    public int groupId() {
+        return grpId;
     }
 
     /** {@inheritDoc} */
@@ -140,18 +140,18 @@ public class FullPageId {
 
         FullPageId that = (FullPageId)o;
 
-        return effectivePageId == that.effectivePageId && cacheId == 
that.cacheId;
+        return effectivePageId == that.effectivePageId && grpId == that.grpId;
     }
 
     /** {@inheritDoc} */
     @Override public int hashCode() {
-        return hashCode0(cacheId, effectivePageId);
+        return hashCode0(grpId, effectivePageId);
     }
 
     /** {@inheritDoc} */
     @Override public String toString() {
         return new SB("FullPageId [pageId=").appendHex(pageId)
             .a(", effectivePageId=").appendHex(effectivePageId)
-            .a(", cacheId=").a(cacheId).a(']').toString();
+            .a(", grpId=").a(grpId).a(']').toString();
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageSupport.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageSupport.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageSupport.java
index f4b2d96..ed2311f 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageSupport.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageSupport.java
@@ -28,87 +28,87 @@ public interface PageSupport {
      * released by calling {@link #releasePage(int, long, long)}. This method 
will allocate page with given ID if it doesn't
      * exist.
      *
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @return Page pointer.
      * @throws IgniteCheckedException If failed.
      */
-    public long acquirePage(int cacheId, long pageId) throws 
IgniteCheckedException;
+    public long acquirePage(int grpId, long pageId) throws 
IgniteCheckedException;
 
     /**
      *
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID to release.
      * @param page Page pointer.
      */
-    public void releasePage(int cacheId, long pageId, long page);
+    public void releasePage(int grpId, long pageId, long page);
 
     /**
      *
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @param page Page pointer.
      * @return Pointer for reading the page.
      */
-    public long readLock(int cacheId, long pageId, long page);
+    public long readLock(int grpId, long pageId, long page);
 
     /**
      * Obtains read lock without checking page tag.
      *
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @param page Page pointer.
      * @return Pointer for reading the page.
      */
-    public long readLockForce(int cacheId, long pageId, long page);
+    public long readLockForce(int grpId, long pageId, long page);
 
     /**
      * Releases locked page.
      *
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @param page Page pointer.
      */
-    public void readUnlock(int cacheId, long pageId, long page);
+    public void readUnlock(int grpId, long pageId, long page);
 
     /**
      *
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @param page Page pointer.
      * @return Address of a buffer with contents of the given page or
      *            {@code 0L} if attempt to take the write lock failed.
      */
-    public long writeLock(int cacheId, long pageId, long page);
+    public long writeLock(int grpId, long pageId, long page);
 
     /**
      *
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @param page Page pointer.
      * @return Address of a buffer with contents of the given page or
      *            {@code 0L} if attempt to take the write lock failed.
      */
-    public long tryWriteLock(int cacheId, long pageId, long page);
+    public long tryWriteLock(int grpId, long pageId, long page);
 
     /**
      * Releases locked page.
      *
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @param page Page pointer.
      * @param walPlc {@code True} if page should be recorded to WAL, {@code 
false} if the page must not
      *      be recorded and {@code null} for the default behavior.
      * @param dirtyFlag Determines whether the page was modified since the 
last checkpoint.
      */
-    public void writeUnlock(int cacheId, long pageId, long page, Boolean 
walPlc,
+    public void writeUnlock(int grpId, long pageId, long page, Boolean walPlc,
         boolean dirtyFlag);
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @param page Page pointer.
      * @return {@code True} if the page is dirty.
      */
-    public boolean isDirty(int cacheId, long pageId, long page);
+    public boolean isDirty(int grpId, long pageId, long page);
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/store/IgnitePageStoreManager.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/store/IgnitePageStoreManager.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/store/IgnitePageStoreManager.java
index fa6e9e4..a1b766f 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/store/IgnitePageStoreManager.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/store/IgnitePageStoreManager.java
@@ -49,8 +49,8 @@ public interface IgnitePageStoreManager extends 
GridCacheSharedManager, IgniteCh
      * @param cacheData Cache data of the cache being started.
      * @throws IgniteCheckedException If failed to handle cache start callback.
      */
-    public void initializeForCache(CacheGroupDescriptor grpDesc,
-        StoredCacheData cacheData) throws IgniteCheckedException;
+    public void initializeForCache(CacheGroupDescriptor grpDesc, 
StoredCacheData cacheData)
+        throws IgniteCheckedException;
 
     /**
      * Callback called when a cache is stopping. After this callback is 
invoked, no data associated with
@@ -84,12 +84,12 @@ public interface IgnitePageStoreManager extends 
GridCacheSharedManager, IgniteCh
     /**
      * Reads a page for the given cache ID. Cache ID may be {@code 0} if the 
page is a meta page.
      *
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId PageID to read.
      * @param pageBuf Page buffer to write to.
      * @throws IgniteCheckedException If failed to read the page.
      */
-    public void read(int cacheId, long pageId, ByteBuffer pageBuf) throws 
IgniteCheckedException;
+    public void read(int grpId, long pageId, ByteBuffer pageBuf) throws 
IgniteCheckedException;
 
     /**
      * Checks if partition store exists.
@@ -104,77 +104,77 @@ public interface IgnitePageStoreManager extends 
GridCacheSharedManager, IgniteCh
     /**
      * Reads a header of a page store.
      *
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param partId Partition ID.
      * @param buf Buffer to write to.
      * @throws IgniteCheckedException If failed.
      */
-    public void readHeader(int cacheId, int partId, ByteBuffer buf) throws 
IgniteCheckedException;
+    public void readHeader(int grpId, int partId, ByteBuffer buf) throws 
IgniteCheckedException;
 
     /**
      * Writes the page for the given cache ID. Cache ID may be {@code 0} if 
the page is a meta page.
      *
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @param pageBuf Page buffer to write.
      * @throws IgniteCheckedException If failed to write page.
      */
-    public void write(int cacheId, long pageId, ByteBuffer pageBuf, int tag) 
throws IgniteCheckedException;
+    public void write(int grpId, long pageId, ByteBuffer pageBuf, int tag) 
throws IgniteCheckedException;
 
     /**
      * Gets page offset within the page store file.
      *
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @return Page offset.
      * @throws IgniteCheckedException If failed.
      */
-    public long pageOffset(int cacheId, long pageId) throws 
IgniteCheckedException;
+    public long pageOffset(int grpId, long pageId) throws 
IgniteCheckedException;
 
     /**
      * Makes sure that all previous writes to the store has been written to 
disk.
      *
-     * @param cacheId Cache ID to sync.
+     * @param grpId Cache group ID to sync.
      * @param partId Partition ID to sync.
      * @throws IgniteCheckedException If IO error occurred while running sync.
      */
-    public void sync(int cacheId, int partId) throws IgniteCheckedException;
+    public void sync(int grpId, int partId) throws IgniteCheckedException;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param partId Partition ID.
      * @throws IgniteCheckedException If failed.
      */
-    public void ensure(int cacheId, int partId) throws IgniteCheckedException;
+    public void ensure(int grpId, int partId) throws IgniteCheckedException;
 
     /**
      * Allocates a page for the given page space.
      *
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param partId Partition ID. Used only if {@code flags} is equal to 
{@link PageMemory#FLAG_DATA}.
      * @param flags Page allocation flags.
      * @return Allocated page ID.
      * @throws IgniteCheckedException If IO exception occurred while 
allocating a page ID.
      */
-    public long allocatePage(int cacheId, int partId, byte flags) throws 
IgniteCheckedException;
+    public long allocatePage(int grpId, int partId, byte flags) throws 
IgniteCheckedException;
 
     /**
      * Gets total number of allocated pages for the given space.
      *
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param partId Partition ID.
      * @return Number of allocated pages.
      * @throws IgniteCheckedException If failed.
      */
-    public int pages(int cacheId, int partId) throws IgniteCheckedException;
+    public int pages(int grpId, int partId) throws IgniteCheckedException;
 
     /**
      * Gets meta page ID for specified cache.
      *
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @return Meta page ID.
      */
-    public long metaPageId(int cacheId);
+    public long metaPageId(int grpId);
 
     /**
      * @return Saved cache configurations.

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageInsertFragmentRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageInsertFragmentRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageInsertFragmentRecord.java
index 042fbe4..3b2ced1 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageInsertFragmentRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageInsertFragmentRecord.java
@@ -32,18 +32,18 @@ public class DataPageInsertFragmentRecord extends 
PageDeltaRecord {
     private final byte[] payload;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @param payload Fragment payload.
      * @param lastLink Link to the last entry fragment.
      */
     public DataPageInsertFragmentRecord(
-        final int cacheId,
+        final int grpId,
         final long pageId,
         final byte[] payload,
         final long lastLink
     ) {
-        super(cacheId, pageId);
+        super(grpId, pageId);
 
         this.lastLink = lastLink;
         this.payload = payload;

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageInsertRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageInsertRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageInsertRecord.java
index 17425fe..e480cc8 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageInsertRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageInsertRecord.java
@@ -29,16 +29,16 @@ public class DataPageInsertRecord extends PageDeltaRecord {
     private byte[] payload;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @param payload Remainder of the record.
      */
     public DataPageInsertRecord(
-        int cacheId,
+        int grpId,
         long pageId,
         byte[] payload
     ) {
-        super(cacheId, pageId);
+        super(grpId, pageId);
 
         this.payload = payload;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageRemoveRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageRemoveRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageRemoveRecord.java
index 3aabe08..b80600c 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageRemoveRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageRemoveRecord.java
@@ -30,12 +30,12 @@ public class DataPageRemoveRecord extends PageDeltaRecord {
     private int itemId;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @param itemId Item ID.
      */
-    public DataPageRemoveRecord(int cacheId, long pageId, int itemId) {
-        super(cacheId, pageId);
+    public DataPageRemoveRecord(int grpId, long pageId, int itemId) {
+        super(grpId, pageId);
 
         this.itemId = itemId;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageSetFreeListPageRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageSetFreeListPageRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageSetFreeListPageRecord.java
index 82281de..a7fd31f 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageSetFreeListPageRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageSetFreeListPageRecord.java
@@ -31,12 +31,12 @@ public class DataPageSetFreeListPageRecord extends 
PageDeltaRecord {
     private long freeListPage;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @param freeListPage Free list page ID.
      */
-    public DataPageSetFreeListPageRecord(int cacheId, long pageId, long 
freeListPage) {
-        super(cacheId, pageId);
+    public DataPageSetFreeListPageRecord(int grpId, long pageId, long 
freeListPage) {
+        super(grpId, pageId);
 
         this.freeListPage = freeListPage;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageUpdateRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageUpdateRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageUpdateRecord.java
index d4e2811..6207f41 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageUpdateRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/DataPageUpdateRecord.java
@@ -32,18 +32,18 @@ public class DataPageUpdateRecord extends PageDeltaRecord {
     private byte[] payload;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @param itemId Item ID.
      * @param payload Record data.
      */
     public DataPageUpdateRecord(
-        int cacheId,
+        int grpId,
         long pageId,
         int itemId,
         byte[] payload
     ) {
-        super(cacheId, pageId);
+        super(grpId, pageId);
 
         this.payload = payload;
         this.itemId = itemId;

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/FixCountRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/FixCountRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/FixCountRecord.java
index 3ab1c4a..80e06ad 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/FixCountRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/FixCountRecord.java
@@ -30,11 +30,11 @@ public class FixCountRecord extends PageDeltaRecord {
     private int cnt;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId  Page ID.
      */
-    public FixCountRecord(int cacheId, long pageId, int cnt) {
-        super(cacheId, pageId);
+    public FixCountRecord(int grpId, long pageId, int cnt) {
+        super(grpId, pageId);
 
         this.cnt = cnt;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/FixLeftmostChildRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/FixLeftmostChildRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/FixLeftmostChildRecord.java
index 15ee7dd..a34e8e3 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/FixLeftmostChildRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/FixLeftmostChildRecord.java
@@ -30,12 +30,12 @@ public class FixLeftmostChildRecord extends PageDeltaRecord 
{
     private long rightId;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId  Page ID.
      * @param rightId Right ID.
      */
-    public FixLeftmostChildRecord(int cacheId, long pageId, long rightId) {
-        super(cacheId, pageId);
+    public FixLeftmostChildRecord(int grpId, long pageId, long rightId) {
+        super(grpId, pageId);
 
         this.rightId = rightId;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/FixRemoveId.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/FixRemoveId.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/FixRemoveId.java
index b6ea410..1ec845d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/FixRemoveId.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/FixRemoveId.java
@@ -30,12 +30,12 @@ public class FixRemoveId extends PageDeltaRecord {
     private long rmvId;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId  Page ID.
      * @param rmvId Remove ID.
      */
-    public FixRemoveId(int cacheId, long pageId, long rmvId) {
-        super(cacheId, pageId);
+    public FixRemoveId(int grpId, long pageId, long rmvId) {
+        super(grpId, pageId);
 
         this.rmvId = rmvId;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/InitNewPageRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/InitNewPageRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/InitNewPageRecord.java
index f883e06..15bd2da 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/InitNewPageRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/InitNewPageRecord.java
@@ -39,14 +39,14 @@ public class InitNewPageRecord extends PageDeltaRecord {
     protected long newPageId;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId  Page ID.
      * @param ioType IO type.
      * @param ioVer IO version.
      * @param newPageId New page ID.
      */
-    public InitNewPageRecord(int cacheId, long pageId, int ioType, int ioVer, 
long newPageId) {
-        super(cacheId, pageId);
+    public InitNewPageRecord(int grpId, long pageId, int ioType, int ioVer, 
long newPageId) {
+        super(grpId, pageId);
 
         this.ioType = ioType;
         this.ioVer = ioVer;

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/InnerReplaceRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/InnerReplaceRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/InnerReplaceRecord.java
index 35d23c1..6e6879d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/InnerReplaceRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/InnerReplaceRecord.java
@@ -38,14 +38,14 @@ public class InnerReplaceRecord<L> extends PageDeltaRecord {
     private long rmvId;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId  Page ID.
      * @param dstIdx Destination index.
      * @param srcPageId Source page ID.
      * @param srcIdx Source index.
      */
-    public InnerReplaceRecord(int cacheId, long pageId, int dstIdx, long 
srcPageId, int srcIdx, long rmvId) {
-        super(cacheId, pageId);
+    public InnerReplaceRecord(int grpId, long pageId, int dstIdx, long 
srcPageId, int srcIdx, long rmvId) {
+        super(grpId, pageId);
 
         this.dstIdx = dstIdx;
         this.srcPageId = srcPageId;

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/InsertRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/InsertRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/InsertRecord.java
index d0e66a3..f6ebe87 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/InsertRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/InsertRecord.java
@@ -42,7 +42,7 @@ public class InsertRecord<L> extends PageDeltaRecord {
     private BPlusIO<L> io;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @param io IO.
      * @param idx Index.
@@ -50,14 +50,14 @@ public class InsertRecord<L> extends PageDeltaRecord {
      * @param rightId Right ID.
      */
     public InsertRecord(
-        int cacheId,
+        int grpId,
         long pageId,
         BPlusIO<L> io,
         int idx,
         byte[] rowBytes,
         long rightId
     ) {
-        super(cacheId, pageId);
+        super(grpId, pageId);
 
         this.io = io;
         this.idx = idx;

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MergeRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MergeRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MergeRecord.java
index 84770d5..2d481d1 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MergeRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MergeRecord.java
@@ -44,15 +44,15 @@ public class MergeRecord<L> extends PageDeltaRecord {
     private boolean emptyBranch;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId  Page ID.
      * @param prntId Parent ID.
      * @param prntIdx Index in parent page.
      * @param rightId Right ID.
      * @param emptyBranch We are merging empty branch.
      */
-    public MergeRecord(int cacheId, long pageId, long prntId, int prntIdx, 
long rightId, boolean emptyBranch) {
-        super(cacheId, pageId);
+    public MergeRecord(int grpId, long pageId, long prntId, int prntIdx, long 
rightId, boolean emptyBranch) {
+        super(grpId, pageId);
 
         this.prntId = prntId;
         this.rightId = rightId;

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageAddRootRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageAddRootRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageAddRootRecord.java
index 1f1e976..ce9e06b 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageAddRootRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageAddRootRecord.java
@@ -29,12 +29,12 @@ public class MetaPageAddRootRecord extends PageDeltaRecord {
     private long rootId;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache ID.
      * @param pageId  Page ID.
      * @param rootId Root ID.
      */
-    public MetaPageAddRootRecord(int cacheId, long pageId, long rootId) {
-        super(cacheId, pageId);
+    public MetaPageAddRootRecord(int grpId, long pageId, long rootId) {
+        super(grpId, pageId);
 
         this.rootId = rootId;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageCutRootRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageCutRootRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageCutRootRecord.java
index 3fc42a1..1e93ab9 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageCutRootRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageCutRootRecord.java
@@ -26,11 +26,11 @@ import 
org.apache.ignite.internal.processors.cache.persistence.tree.io.BPlusMeta
  */
 public class MetaPageCutRootRecord extends PageDeltaRecord {
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId  Page ID.
      */
-    public MetaPageCutRootRecord(int cacheId, long pageId) {
-        super(cacheId, pageId);
+    public MetaPageCutRootRecord(int grpId, long pageId) {
+        super(grpId, pageId);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageInitRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageInitRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageInitRecord.java
index 692b8f1..b1e701a 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageInitRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageInitRecord.java
@@ -36,14 +36,14 @@ public class MetaPageInitRecord extends InitNewPageRecord {
     private int ioType;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @param ioType IO type.
      * @param treeRoot Tree root.
      * @param reuseListRoot Reuse list root.
      */
-    public MetaPageInitRecord(int cacheId, long pageId, int ioType, int ioVer, 
long treeRoot, long reuseListRoot) {
-        super(cacheId, pageId, ioType, ioVer, pageId);
+    public MetaPageInitRecord(int grpId, long pageId, int ioType, int ioVer, 
long treeRoot, long reuseListRoot) {
+        super(grpId, pageId, ioType, ioVer, pageId);
 
         assert ioType == PageIO.T_META || ioType == PageIO.T_PART_META;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageInitRootInlineRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageInitRootInlineRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageInitRootInlineRecord.java
index 7eb8426..2b82444 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageInitRootInlineRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageInitRootInlineRecord.java
@@ -30,13 +30,13 @@ public class MetaPageInitRootInlineRecord extends 
MetaPageInitRootRecord {
     private final int inlineSize;
 
     /**
-     * @param cacheId
+     * @param grpId Cache group ID.
      * @param pageId Meta page ID.
      * @param rootId
      * @param inlineSize Inline size.
      */
-    public MetaPageInitRootInlineRecord(int cacheId, long pageId, long rootId, 
int inlineSize) {
-        super(cacheId, pageId, rootId);
+    public MetaPageInitRootInlineRecord(int grpId, long pageId, long rootId, 
int inlineSize) {
+        super(grpId, pageId, rootId);
         this.inlineSize = inlineSize;
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageInitRootRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageInitRootRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageInitRootRecord.java
index 0eb61b5..ebdf3d4 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageInitRootRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageInitRootRecord.java
@@ -31,8 +31,8 @@ public class MetaPageInitRootRecord extends PageDeltaRecord {
     /**
      * @param pageId Meta page ID.
      */
-    public MetaPageInitRootRecord(int cacheId, long pageId, long rootId) {
-        super(cacheId, pageId);
+    public MetaPageInitRootRecord(int grpId, long pageId, long rootId) {
+        super(grpId, pageId);
 
         assert pageId != rootId;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdateLastAllocatedIndex.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdateLastAllocatedIndex.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdateLastAllocatedIndex.java
index 548735e..60aebde 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdateLastAllocatedIndex.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdateLastAllocatedIndex.java
@@ -32,8 +32,8 @@ public class MetaPageUpdateLastAllocatedIndex extends 
PageDeltaRecord {
     /**
      * @param pageId Meta page ID.
      */
-    public MetaPageUpdateLastAllocatedIndex(int cacheId, long pageId, int 
lastAllocatedIdx) {
-        super(cacheId, pageId);
+    public MetaPageUpdateLastAllocatedIndex(int grpId, long pageId, int 
lastAllocatedIdx) {
+        super(grpId, pageId);
 
         this.lastAllocatedIdx = lastAllocatedIdx;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdateLastSuccessfulFullSnapshotId.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdateLastSuccessfulFullSnapshotId.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdateLastSuccessfulFullSnapshotId.java
index 34be353..03f945f 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdateLastSuccessfulFullSnapshotId.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdateLastSuccessfulFullSnapshotId.java
@@ -31,8 +31,8 @@ public class MetaPageUpdateLastSuccessfulFullSnapshotId 
extends PageDeltaRecord
     /**
      * @param pageId Meta page ID.
      */
-    public MetaPageUpdateLastSuccessfulFullSnapshotId(int cacheId, long 
pageId, long lastSuccessfulFullSnapshotId) {
-        super(cacheId, pageId);
+    public MetaPageUpdateLastSuccessfulFullSnapshotId(int grpId, long pageId, 
long lastSuccessfulFullSnapshotId) {
+        super(grpId, pageId);
 
         this.lastSuccessfulFullSnapshotId = lastSuccessfulFullSnapshotId;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdateLastSuccessfulSnapshotId.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdateLastSuccessfulSnapshotId.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdateLastSuccessfulSnapshotId.java
index 7fca5dc..07798bb 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdateLastSuccessfulSnapshotId.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdateLastSuccessfulSnapshotId.java
@@ -34,8 +34,8 @@ public class MetaPageUpdateLastSuccessfulSnapshotId extends 
PageDeltaRecord {
      * @param pageId Meta page ID.
      * @param snapshotTag
      */
-    public MetaPageUpdateLastSuccessfulSnapshotId(int cacheId, long pageId, 
long lastSuccessfulSnapshotId, long snapshotTag) {
-        super(cacheId, pageId);
+    public MetaPageUpdateLastSuccessfulSnapshotId(int grpId, long pageId, long 
lastSuccessfulSnapshotId, long snapshotTag) {
+        super(grpId, pageId);
 
         this.lastSuccessfulSnapshotId = lastSuccessfulSnapshotId;
         this.lastSuccessfulSnapshotTag = snapshotTag;

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdateNextSnapshotId.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdateNextSnapshotId.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdateNextSnapshotId.java
index 0cd72ec..e2d1267 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdateNextSnapshotId.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdateNextSnapshotId.java
@@ -31,8 +31,8 @@ public class MetaPageUpdateNextSnapshotId extends 
PageDeltaRecord {
     /**
      * @param pageId Meta page ID.
      */
-    public MetaPageUpdateNextSnapshotId(int cacheId, long pageId, long 
nextSnapshotId) {
-        super(cacheId, pageId);
+    public MetaPageUpdateNextSnapshotId(int grpId, long pageId, long 
nextSnapshotId) {
+        super(grpId, pageId);
 
         this.nextSnapshotId = nextSnapshotId;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdatePartitionDataRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdatePartitionDataRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdatePartitionDataRecord.java
index 15d1a0c..f85f468 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdatePartitionDataRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdatePartitionDataRecord.java
@@ -45,12 +45,12 @@ public class MetaPageUpdatePartitionDataRecord extends 
PageDeltaRecord {
     private long cntrsPageId;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @param allocatedIdxCandidate Page Allocated index candidate
      */
     public MetaPageUpdatePartitionDataRecord(
-        int cacheId,
+        int grpId,
         long pageId,
         long updateCntr,
         long globalRmvId,
@@ -58,7 +58,7 @@ public class MetaPageUpdatePartitionDataRecord extends 
PageDeltaRecord {
         long cntrsPageId, byte state,
         int allocatedIdxCandidate
     ) {
-        super(cacheId, pageId);
+        super(grpId, pageId);
 
         this.updateCntr = updateCntr;
         this.globalRmvId = globalRmvId;

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/NewRootInitRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/NewRootInitRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/NewRootInitRecord.java
index bdfdef5..f39f91c 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/NewRootInitRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/NewRootInitRecord.java
@@ -41,7 +41,7 @@ public class NewRootInitRecord<L> extends PageDeltaRecord {
     private long rightChildId;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId  Page ID.
      * @param io IO.
      * @param leftChildId Left child ID.
@@ -49,7 +49,7 @@ public class NewRootInitRecord<L> extends PageDeltaRecord {
      * @param rightChildId Right child ID.
      */
     public NewRootInitRecord(
-        int cacheId,
+        int grpId,
         long pageId,
         long newRootId,
         BPlusInnerIO<L> io,
@@ -57,7 +57,7 @@ public class NewRootInitRecord<L> extends PageDeltaRecord {
         byte[] rowBytes,
         long rightChildId
     ) {
-        super(cacheId, pageId);
+        super(grpId, pageId);
 
         assert io != null;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PageDeltaRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PageDeltaRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PageDeltaRecord.java
index ca52bd2..260c2c8 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PageDeltaRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PageDeltaRecord.java
@@ -29,18 +29,18 @@ import org.apache.ignite.internal.util.typedef.internal.U;
  */
 public abstract class PageDeltaRecord extends WALRecord {
     /** */
-    private int cacheId;
+    private int grpId;
 
     /** */
     @GridToStringExclude
     private long pageId;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      */
-    protected PageDeltaRecord(int cacheId, long pageId) {
-        this.cacheId = cacheId;
+    protected PageDeltaRecord(int grpId, long pageId) {
+        this.grpId = grpId;
         this.pageId = pageId;
     }
 
@@ -52,10 +52,10 @@ public abstract class PageDeltaRecord extends WALRecord {
     }
 
     /**
-     * @return Cache ID.
+     * @return Cache group ID.
      */
-    public int cacheId() {
-        return cacheId;
+    public int groupId() {
+        return grpId;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PageListMetaResetCountRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PageListMetaResetCountRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PageListMetaResetCountRecord.java
index 4756c9a..9c12380 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PageListMetaResetCountRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PageListMetaResetCountRecord.java
@@ -26,11 +26,11 @@ import 
org.apache.ignite.internal.processors.cache.persistence.freelist.io.Pages
  */
 public class PageListMetaResetCountRecord extends PageDeltaRecord  {
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      */
-    public PageListMetaResetCountRecord(int cacheId, long pageId) {
-        super(cacheId, pageId);
+    public PageListMetaResetCountRecord(int grpId, long pageId) {
+        super(grpId, pageId);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListAddPageRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListAddPageRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListAddPageRecord.java
index 2577ec3..6c7fc71 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListAddPageRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListAddPageRecord.java
@@ -33,12 +33,12 @@ public class PagesListAddPageRecord extends PageDeltaRecord 
{
     private final long dataPageId;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @param dataPageId Data page ID to add.
      */
-    public PagesListAddPageRecord(int cacheId, long pageId, long dataPageId) {
-        super(cacheId, pageId);
+    public PagesListAddPageRecord(int grpId, long pageId, long dataPageId) {
+        super(grpId, pageId);
 
         this.dataPageId = dataPageId;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListInitNewPageRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListInitNewPageRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListInitNewPageRecord.java
index 673d33c..ee83b8b 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListInitNewPageRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListInitNewPageRecord.java
@@ -38,13 +38,13 @@ public class PagesListInitNewPageRecord extends 
InitNewPageRecord {
     private final long addDataPageId;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @param prevPageId Previous page ID.
      * @param addDataPageId Optional page ID to add.
      */
     public PagesListInitNewPageRecord(
-        int cacheId,
+        int grpId,
         long pageId,
         int ioType,
         int ioVer,
@@ -52,7 +52,7 @@ public class PagesListInitNewPageRecord extends 
InitNewPageRecord {
         long prevPageId,
         long addDataPageId
     ) {
-        super(cacheId, pageId, ioType, ioVer, newPageId);
+        super(grpId, pageId, ioType, ioVer, newPageId);
 
         this.prevPageId = prevPageId;
         this.addDataPageId = addDataPageId;

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListRemovePageRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListRemovePageRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListRemovePageRecord.java
index 2341129..8f2cd72 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListRemovePageRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListRemovePageRecord.java
@@ -69,6 +69,6 @@ public class PagesListRemovePageRecord extends 
PageDeltaRecord {
         return S.toString(PagesListRemovePageRecord.class, this,
             "rmvdPageId", U.hexLong(rmvdPageId),
             "pageId", U.hexLong(pageId()),
-            "cacheId", cacheId());
+            "grpId", groupId());
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListSetNextRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListSetNextRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListSetNextRecord.java
index 30600e1..f46ac8e 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListSetNextRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListSetNextRecord.java
@@ -29,12 +29,12 @@ public class PagesListSetNextRecord extends PageDeltaRecord 
{
     private final long nextPageId;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @param nextPageId Next page ID.
      */
-    public PagesListSetNextRecord(int cacheId, long pageId, long nextPageId) {
-        super(cacheId, pageId);
+    public PagesListSetNextRecord(int grpId, long pageId, long nextPageId) {
+        super(grpId, pageId);
 
         this.nextPageId = nextPageId;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListSetPreviousRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListSetPreviousRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListSetPreviousRecord.java
index 590643e..cc27077 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListSetPreviousRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListSetPreviousRecord.java
@@ -29,12 +29,12 @@ public class PagesListSetPreviousRecord extends 
PageDeltaRecord {
     private final long prevPageId;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Page ID.
      * @param prevPageId Previous page ID.
      */
-    public PagesListSetPreviousRecord(int cacheId, long pageId, long 
prevPageId) {
-        super(cacheId, pageId);
+    public PagesListSetPreviousRecord(int grpId, long pageId, long prevPageId) 
{
+        super(grpId, pageId);
 
         this.prevPageId = prevPageId;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PartitionDestroyRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PartitionDestroyRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PartitionDestroyRecord.java
index c3b8200..834dc58 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PartitionDestroyRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PartitionDestroyRecord.java
@@ -24,17 +24,17 @@ import 
org.apache.ignite.internal.pagemem.wal.record.WALRecord;
  */
 public class PartitionDestroyRecord extends WALRecord {
     /** */
-    private int cacheId;
+    private int grpId;
 
     /** */
     private int partId;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param partId Partition ID.
      */
-    public PartitionDestroyRecord(int cacheId, int partId) {
-        this.cacheId = cacheId;
+    public PartitionDestroyRecord(int grpId, int partId) {
+        this.grpId = grpId;
         this.partId = partId;
     }
 
@@ -44,17 +44,17 @@ public class PartitionDestroyRecord extends WALRecord {
     }
 
     /**
-     * @return Cache ID.
+     * @return Cache group ID.
      */
-    public int cacheId() {
-        return cacheId;
+    public int groupId() {
+        return grpId;
     }
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      */
-    public void cacheId(int cacheId) {
-        this.cacheId = cacheId;
+    public void groupId(int grpId) {
+        this.grpId = grpId;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PartitionMetaStateRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PartitionMetaStateRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PartitionMetaStateRecord.java
index 95e1a56..8ab794c 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PartitionMetaStateRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PartitionMetaStateRecord.java
@@ -27,8 +27,8 @@ public class PartitionMetaStateRecord extends WALRecord {
     /** State. */
     private final byte state;
 
-    /** Cache id. */
-    private final int cacheId;
+    /** Cache group ID. */
+    private final int grpId;
 
     /** Partition id. */
     private final int partId;
@@ -37,11 +37,11 @@ public class PartitionMetaStateRecord extends WALRecord {
     private final long updateCounter;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param state Page ID.
      */
-    public PartitionMetaStateRecord(int cacheId, int partId, 
GridDhtPartitionState state, long updateCounter) {
-        this.cacheId = cacheId;
+    public PartitionMetaStateRecord(int grpId, int partId, 
GridDhtPartitionState state, long updateCounter) {
+        this.grpId = grpId;
         this.partId = partId;
         this.state = (byte)state.ordinal();
         this.updateCounter = updateCounter;
@@ -60,10 +60,10 @@ public class PartitionMetaStateRecord extends WALRecord {
     }
 
     /**
-     * @return Cache ID.
+     * @return Cache group ID.
      */
-    public int cacheId() {
-        return cacheId;
+    public int groupId() {
+        return grpId;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/RecycleRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/RecycleRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/RecycleRecord.java
index 92ea88e..b505e4d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/RecycleRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/RecycleRecord.java
@@ -29,12 +29,12 @@ public class RecycleRecord extends PageDeltaRecord {
     private long newPageId;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId  Page ID.
      * @param newPageId New page ID.
      */
-    public RecycleRecord(int cacheId, long pageId, long newPageId) {
-        super(cacheId, pageId);
+    public RecycleRecord(int grpId, long pageId, long newPageId) {
+        super(grpId, pageId);
 
         this.newPageId = newPageId;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/RemoveRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/RemoveRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/RemoveRecord.java
index ac5d442..53f9cb0 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/RemoveRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/RemoveRecord.java
@@ -34,13 +34,13 @@ public class RemoveRecord extends PageDeltaRecord {
     private int cnt;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId  Page ID.
      * @param idx Index.
      * @param cnt Count.
      */
-    public RemoveRecord(int cacheId, long pageId, int idx, int cnt) {
-        super(cacheId, pageId);
+    public RemoveRecord(int grpId, long pageId, int idx, int cnt) {
+        super(grpId, pageId);
 
         this.idx = idx;
         this.cnt = cnt;

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/ReplaceRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/ReplaceRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/ReplaceRecord.java
index 2f504ad..2fbc0dd 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/ReplaceRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/ReplaceRecord.java
@@ -35,14 +35,14 @@ public class ReplaceRecord<L> extends PageDeltaRecord {
     private int idx;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId  Page ID.
      * @param io IO.
      * @param rowBytes Row bytes.
      * @param idx Index.
      */
-    public ReplaceRecord(int cacheId, long pageId, BPlusIO<L> io, byte[] 
rowBytes, int idx) {
-        super(cacheId, pageId);
+    public ReplaceRecord(int grpId, long pageId, BPlusIO<L> io, byte[] 
rowBytes, int idx) {
+        super(grpId, pageId);
 
         this.io = io;
         this.rowBytes = rowBytes;

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/SplitExistingPageRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/SplitExistingPageRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/SplitExistingPageRecord.java
index 5cb3023..87638a6 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/SplitExistingPageRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/SplitExistingPageRecord.java
@@ -37,13 +37,13 @@ public class SplitExistingPageRecord extends 
PageDeltaRecord {
     private long fwdId;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId  Page ID.
      * @param mid Bisection index.
      * @param fwdId New forward page ID.
      */
-    public SplitExistingPageRecord(int cacheId, long pageId, int mid, long 
fwdId) {
-        super(cacheId, pageId);
+    public SplitExistingPageRecord(int grpId, long pageId, int mid, long 
fwdId) {
+        super(grpId, pageId);
 
         this.mid = mid;
         this.fwdId = fwdId;

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/SplitForwardPageRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/SplitForwardPageRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/SplitForwardPageRecord.java
index 39f2669..7f855f7 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/SplitForwardPageRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/SplitForwardPageRecord.java
@@ -45,7 +45,7 @@ public class SplitForwardPageRecord extends PageDeltaRecord {
     private int cnt;
 
     /**
-     * @param cacheId Cache ID.
+     * @param grpId Cache group ID.
      * @param pageId Real forward page ID.
      * @param fwdId Virtual forward page ID.
      * @param ioType IO Type.
@@ -55,7 +55,7 @@ public class SplitForwardPageRecord extends PageDeltaRecord {
      * @param cnt Initial elements count in the page being split.
      */
     public SplitForwardPageRecord(
-        int cacheId,
+        int grpId,
         long pageId,
         long fwdId,
         int ioType,
@@ -64,7 +64,7 @@ public class SplitForwardPageRecord extends PageDeltaRecord {
         int mid,
         int cnt
     ) {
-        super(cacheId, pageId);
+        super(grpId, pageId);
 
         this.fwdId = fwdId;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/TrackingPageDeltaRecord.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/TrackingPageDeltaRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/TrackingPageDeltaRecord.java
index 05e96ff..3d88e8c 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/TrackingPageDeltaRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/TrackingPageDeltaRecord.java
@@ -35,13 +35,13 @@ public class TrackingPageDeltaRecord extends 
PageDeltaRecord {
     private final long lastSuccessfulSnapshotId;
 
     /**
-     * @param cacheId Cache id.
+     * @param grpId Cache group id.
      * @param pageId Page id.
      * @param nextSnapshotId
      * @param lastSuccessfulSnapshotId
      */
-    public TrackingPageDeltaRecord(int cacheId, long pageId, long 
pageIdToMark, long nextSnapshotId, long lastSuccessfulSnapshotId) {
-        super(cacheId, pageId);
+    public TrackingPageDeltaRecord(int grpId, long pageId, long pageIdToMark, 
long nextSnapshotId, long lastSuccessfulSnapshotId) {
+        super(grpId, pageId);
 
         this.pageIdToMark = pageIdToMark;
         this.nextSnapshotId = nextSnapshotId;

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/DataStructure.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/DataStructure.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/DataStructure.java
index b2a8f36..9161d69 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/DataStructure.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/DataStructure.java
@@ -45,7 +45,7 @@ public abstract class DataStructure implements 
PageLockListener {
     public static Random rnd;
 
     /** */
-    protected final int cacheId;
+    protected final int grpId;
 
     /** */
     protected final PageMemory pageMem;
@@ -57,7 +57,7 @@ public abstract class DataStructure implements 
PageLockListener {
     protected ReuseList reuseList;
 
     /**
-     * @param cacheId Cache ID.
+     * @param cacheId Cache group ID.
      * @param pageMem Page memory.
      * @param wal Write ahead log manager.
      */
@@ -68,16 +68,16 @@ public abstract class DataStructure implements 
PageLockListener {
     ) {
         assert pageMem != null;
 
-        this.cacheId = cacheId;
+        this.grpId = cacheId;
         this.pageMem = pageMem;
         this.wal = wal;
     }
 
     /**
-     * @return Cache ID.
+     * @return Cache group ID.
      */
-    public final int getCacheId() {
-        return cacheId;
+    public final int groupId() {
+        return grpId;
     }
 
     /**
@@ -114,7 +114,7 @@ public abstract class DataStructure implements 
PageLockListener {
      * @throws IgniteCheckedException If failed.
      */
     protected long allocatePageNoReuse() throws IgniteCheckedException {
-        return pageMem.allocatePage(cacheId, PageIdAllocator.INDEX_PARTITION, 
FLAG_IDX);
+        return pageMem.allocatePage(grpId, PageIdAllocator.INDEX_PARTITION, 
FLAG_IDX);
     }
 
     /**
@@ -126,7 +126,7 @@ public abstract class DataStructure implements 
PageLockListener {
         assert PageIdUtils.flag(pageId) == FLAG_IDX && 
PageIdUtils.partId(pageId) == INDEX_PARTITION ||
             PageIdUtils.flag(pageId) == FLAG_DATA && 
PageIdUtils.partId(pageId) <= MAX_PARTITION_ID : U.hexLong(pageId);
 
-        return pageMem.acquirePage(cacheId, pageId);
+        return pageMem.acquirePage(grpId, pageId);
     }
 
     /**
@@ -134,7 +134,7 @@ public abstract class DataStructure implements 
PageLockListener {
      * @param page  Page pointer.
      */
     protected final void releasePage(long pageId, long page) {
-        pageMem.releasePage(cacheId, pageId, page);
+        pageMem.releasePage(grpId, pageId, page);
     }
 
     /**
@@ -143,7 +143,7 @@ public abstract class DataStructure implements 
PageLockListener {
      * @return Page address or {@code 0} if failed to lock due to recycling.
      */
     protected final long tryWriteLock(long pageId, long page) {
-        return PageHandler.writeLock(pageMem, cacheId, pageId, page, this, 
true);
+        return PageHandler.writeLock(pageMem, grpId, pageId, page, this, true);
     }
 
     /**
@@ -152,7 +152,7 @@ public abstract class DataStructure implements 
PageLockListener {
      * @return Page address.
      */
     protected final long writeLock(long pageId, long page) {
-        return PageHandler.writeLock(pageMem, cacheId, pageId, page, this, 
false);
+        return PageHandler.writeLock(pageMem, grpId, pageId, page, this, 
false);
     }
 
     /**
@@ -174,7 +174,7 @@ public abstract class DataStructure implements 
PageLockListener {
      * @return Page address.
      */
     protected final long readLock(long pageId, long page) {
-        return PageHandler.readLock(pageMem, cacheId, pageId, page, this);
+        return PageHandler.readLock(pageMem, grpId, pageId, page, this);
     }
 
     /**
@@ -183,7 +183,7 @@ public abstract class DataStructure implements 
PageLockListener {
      * @param pageAddr  Page address.
      */
     protected final void readUnlock(long pageId, long page, long pageAddr) {
-        PageHandler.readUnlock(pageMem, cacheId, pageId, page, pageAddr, this);
+        PageHandler.readUnlock(pageMem, grpId, pageId, page, pageAddr, this);
     }
 
     /**
@@ -194,7 +194,7 @@ public abstract class DataStructure implements 
PageLockListener {
      * @param dirty Dirty flag.
      */
     protected final void writeUnlock(long pageId, long page, long pageAddr, 
Boolean walPlc, boolean dirty) {
-        PageHandler.writeUnlock(pageMem, cacheId, pageId, page, pageAddr, 
this, walPlc, dirty);
+        PageHandler.writeUnlock(pageMem, grpId, pageId, page, pageAddr, this, 
walPlc, dirty);
     }
 
     /**
@@ -204,7 +204,7 @@ public abstract class DataStructure implements 
PageLockListener {
      * @return {@code true} If we need to make a delta WAL record for the 
change in this page.
      */
     protected final boolean needWalDeltaRecord(long pageId, long page, Boolean 
walPlc) {
-        return PageHandler.isWalDeltaRecordNeeded(pageMem, cacheId, pageId, 
page, wal, walPlc);
+        return PageHandler.isWalDeltaRecordNeeded(pageMem, grpId, pageId, 
page, wal, walPlc);
     }
 
     /**
@@ -220,7 +220,7 @@ public abstract class DataStructure implements 
PageLockListener {
         PageHandler<?, R> h,
         int intArg,
         R lockFailed) throws IgniteCheckedException {
-        return PageHandler.writePage(pageMem, cacheId, pageId, this, h, null, 
null, null, null, intArg, lockFailed);
+        return PageHandler.writePage(pageMem, grpId, pageId, this, h, null, 
null, null, null, intArg, lockFailed);
     }
 
     /**
@@ -238,7 +238,7 @@ public abstract class DataStructure implements 
PageLockListener {
         X arg,
         int intArg,
         R lockFailed) throws IgniteCheckedException {
-        return PageHandler.writePage(pageMem, cacheId, pageId, this, h, null, 
null, null, arg, intArg, lockFailed);
+        return PageHandler.writePage(pageMem, grpId, pageId, this, h, null, 
null, null, arg, intArg, lockFailed);
     }
 
     /**
@@ -258,7 +258,7 @@ public abstract class DataStructure implements 
PageLockListener {
         X arg,
         int intArg,
         R lockFailed) throws IgniteCheckedException {
-        return PageHandler.writePage(pageMem, cacheId, pageId, page, this, h, 
null, null, null, arg, intArg, lockFailed);
+        return PageHandler.writePage(pageMem, grpId, pageId, page, this, h, 
null, null, null, arg, intArg, lockFailed);
     }
 
     /**
@@ -278,7 +278,7 @@ public abstract class DataStructure implements 
PageLockListener {
         X arg,
         int intArg,
         R lockFailed) throws IgniteCheckedException {
-        return PageHandler.writePage(pageMem, cacheId, pageId, this, h, init, 
wal, null, arg, intArg, lockFailed);
+        return PageHandler.writePage(pageMem, grpId, pageId, this, h, init, 
wal, null, arg, intArg, lockFailed);
     }
 
     /**
@@ -296,7 +296,7 @@ public abstract class DataStructure implements 
PageLockListener {
         X arg,
         int intArg,
         R lockFailed) throws IgniteCheckedException {
-        return PageHandler.readPage(pageMem, cacheId, pageId, this, h, arg, 
intArg, lockFailed);
+        return PageHandler.readPage(pageMem, grpId, pageId, this, h, arg, 
intArg, lockFailed);
     }
 
     /**
@@ -316,7 +316,7 @@ public abstract class DataStructure implements 
PageLockListener {
         X arg,
         int intArg,
         R lockFailed) throws IgniteCheckedException {
-        return PageHandler.readPage(pageMem, cacheId, pageId, page, this, h, 
arg, intArg, lockFailed);
+        return PageHandler.readPage(pageMem, grpId, pageId, page, this, h, 
arg, intArg, lockFailed);
     }
 
     /**
@@ -325,7 +325,7 @@ public abstract class DataStructure implements 
PageLockListener {
      * @throws IgniteCheckedException if failed.
      */
     protected final void init(long pageId, PageIO init) throws 
IgniteCheckedException {
-        PageHandler.initPage(pageMem, cacheId, pageId, init, wal, this);
+        PageHandler.initPage(pageMem, grpId, pageId, init, wal, this);
     }
 
     /**
@@ -346,7 +346,7 @@ public abstract class DataStructure implements 
PageLockListener {
         PageIO.setPageId(pageAddr, rotated);
 
         if (needWalDeltaRecord(pageId, page, walPlc))
-            wal.log(new RecycleRecord(cacheId, pageId, rotated));
+            wal.log(new RecycleRecord(grpId, pageId, rotated));
 
         return rotated;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
index 8fe9377..5136731 100755
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
@@ -623,7 +623,7 @@ public class GridCacheDatabaseSharedManager extends 
IgniteCacheDatabaseSharedMan
                     Integer tag
                 ) throws IgniteCheckedException {
                     // First of all, write page to disk.
-                    storeMgr.write(fullId.cacheId(), fullId.pageId(), pageBuf, 
tag);
+                    storeMgr.write(fullId.groupId(), fullId.pageId(), pageBuf, 
tag);
 
                     // Only after write we can write page into snapshot.
                     snapshotMgr.flushDirtyPageHandler(fullId, pageBuf, tag);
@@ -1336,25 +1336,25 @@ public class GridCacheDatabaseSharedManager extends 
IgniteCacheDatabaseSharedMan
 
                             // Here we do not require tag check because we may 
be applying memory changes after
                             // several repetitive restarts and the same pages 
may have changed several times.
-                            int cacheId = pageRec.fullPageId().cacheId();
+                            int grpId = pageRec.fullPageId().groupId();
                             long pageId = pageRec.fullPageId().pageId();
 
-                            PageMemoryEx pageMem = 
getPageMemoryForCacheGroup(cacheId);
+                            PageMemoryEx pageMem = 
getPageMemoryForCacheGroup(grpId);
 
-                            long page = pageMem.acquirePage(cacheId, pageId, 
true);
+                            long page = pageMem.acquirePage(grpId, pageId, 
true);
 
                             try {
-                                long pageAddr = pageMem.writeLock(cacheId, 
pageId, page);
+                                long pageAddr = pageMem.writeLock(grpId, 
pageId, page);
 
                                 try {
                                     PageUtils.putBytes(pageAddr, 0, 
pageRec.pageData());
                                 }
                                 finally {
-                                    pageMem.writeUnlock(cacheId, pageId, page, 
null, true, true);
+                                    pageMem.writeUnlock(grpId, pageId, page, 
null, true, true);
                                 }
                             }
                             finally {
-                                pageMem.releasePage(cacheId, pageId, page);
+                                pageMem.releasePage(grpId, pageId, page);
                             }
 
                             applied++;
@@ -1366,14 +1366,14 @@ public class GridCacheDatabaseSharedManager extends 
IgniteCacheDatabaseSharedMan
                         if (apply) {
                             PartitionDestroyRecord destroyRec = 
(PartitionDestroyRecord)rec;
 
-                            final int cId = destroyRec.cacheId();
+                            final int gId = destroyRec.groupId();
                             final int pId = destroyRec.partitionId();
 
-                            PageMemoryEx pageMem = 
getPageMemoryForCacheGroup(cId);
+                            PageMemoryEx pageMem = 
getPageMemoryForCacheGroup(gId);
 
                             pageMem.clearAsync(new P3<Integer, Long, 
Integer>() {
                                 @Override public boolean apply(Integer 
cacheId, Long pageId, Integer tag) {
-                                    return cacheId == cId && 
PageIdUtils.partId(pageId) == pId;
+                                    return cacheId == gId && 
PageIdUtils.partId(pageId) == pId;
                                 }
                             }, true).get();
                         }
@@ -1384,27 +1384,27 @@ public class GridCacheDatabaseSharedManager extends 
IgniteCacheDatabaseSharedMan
                         if (apply && rec instanceof PageDeltaRecord) {
                             PageDeltaRecord r = (PageDeltaRecord)rec;
 
-                            int cacheId = r.cacheId();
+                            int grpId = r.groupId();
                             long pageId = r.pageId();
 
-                            PageMemoryEx pageMem = 
getPageMemoryForCacheGroup(cacheId);
+                            PageMemoryEx pageMem = 
getPageMemoryForCacheGroup(grpId);
 
                             // Here we do not require tag check because we may 
be applying memory changes after
                             // several repetitive restarts and the same pages 
may have changed several times.
-                            long page = pageMem.acquirePage(cacheId, pageId, 
true);
+                            long page = pageMem.acquirePage(grpId, pageId, 
true);
 
                             try {
-                                long pageAddr = pageMem.writeLock(cacheId, 
pageId, page);
+                                long pageAddr = pageMem.writeLock(grpId, 
pageId, page);
 
                                 try {
                                     r.applyDelta(pageMem, pageAddr);
                                 }
                                 finally {
-                                    pageMem.writeUnlock(cacheId, pageId, page, 
null, true, true);
+                                    pageMem.writeUnlock(grpId, pageId, page, 
null, true, true);
                                 }
                             }
                             finally {
-                                pageMem.releasePage(cacheId, pageId, page);
+                                pageMem.releasePage(grpId, pageId, page);
                             }
 
                             applied++;
@@ -1493,7 +1493,7 @@ public class GridCacheDatabaseSharedManager extends 
IgniteCacheDatabaseSharedMan
                     case PART_META_UPDATE_STATE:
                         PartitionMetaStateRecord metaStateRecord = 
(PartitionMetaStateRecord)rec;
 
-                        partStates.put(new T2<>(metaStateRecord.cacheId(), 
metaStateRecord.partitionId()),
+                        partStates.put(new T2<>(metaStateRecord.groupId(), 
metaStateRecord.partitionId()),
                             new T2<>((int)metaStateRecord.state(), 
metaStateRecord.updateCounter()));
 
                         break;
@@ -1686,7 +1686,7 @@ public class GridCacheDatabaseSharedManager extends 
IgniteCacheDatabaseSharedMan
                 if (tag != null) {
                     tmpWriteBuf.rewind();
 
-                    PageStore store = storeMgr.writeInternal(fullId.cacheId(), 
fullId.pageId(), tmpWriteBuf, tag);
+                    PageStore store = storeMgr.writeInternal(fullId.groupId(), 
fullId.pageId(), tmpWriteBuf, tag);
 
                     tmpWriteBuf.rewind();
 
@@ -2326,7 +2326,7 @@ public class GridCacheDatabaseSharedManager extends 
IgniteCacheDatabaseSharedMan
 
                     snapshotMgr.beforePageWrite(fullId);
 
-                    int grpId = fullId.cacheId();
+                    int grpId = fullId.groupId();
 
                     CacheGroupContext grp = 
context().cache().cacheGroup(grpId);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/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 4d30eb4..bd902fb 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
@@ -888,7 +888,7 @@ public class GridCacheOffheapManager extends 
IgniteCacheOffheapManagerImpl imple
                         reuseRoot.pageId().pageId(),
                         reuseRoot.isAllocated()) {
                         @Override protected long allocatePageNoReuse() throws 
IgniteCheckedException {
-                            return pageMem.allocatePage(cacheId, partId, 
PageIdAllocator.FLAG_DATA);
+                            return pageMem.allocatePage(grpId, partId, 
PageIdAllocator.FLAG_DATA);
                         }
                     };
 
@@ -904,7 +904,7 @@ public class GridCacheOffheapManager extends 
IgniteCacheOffheapManagerImpl imple
                         treeRoot.pageId().pageId(),
                         treeRoot.isAllocated()) {
                         @Override protected long allocatePageNoReuse() throws 
IgniteCheckedException {
-                            return pageMem.allocatePage(cacheId, partId, 
PageIdAllocator.FLAG_DATA);
+                            return pageMem.allocatePage(grpId, partId, 
PageIdAllocator.FLAG_DATA);
                         }
                     };
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f2568b76/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/MetadataStorage.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/MetadataStorage.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/MetadataStorage.java
index 806afb8..743f3b9 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/MetadataStorage.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/MetadataStorage.java
@@ -186,7 +186,7 @@ public class MetadataStorage implements MetaStore {
 
         /** {@inheritDoc} */
         @Override protected long allocatePageNoReuse() throws 
IgniteCheckedException {
-            return pageMem.allocatePage(getCacheId(), allocPartId, allocSpace);
+            return pageMem.allocatePage(groupId(), allocPartId, allocSpace);
         }
 
         /** {@inheritDoc} */

Reply via email to