ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [23/36] ignite git commit: ignite-3484
Date Fri, 08 Sep 2017 12:35:55 GMT
ignite-3484


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

Branch: refs/heads/ignite-6149
Commit: e3bba83256c1eb53c4b40fbd9ddba47fcf9d58d5
Parents: 6be6779
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Sep 6 10:10:26 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Sep 6 10:10:26 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/tree/CacheDataTree.java    | 21 +++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e3bba832/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/CacheDataTree.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/CacheDataTree.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/CacheDataTree.java
index b65483e..99b1372 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/CacheDataTree.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/CacheDataTree.java
@@ -82,6 +82,10 @@ public class CacheDataTree extends BPlusTree<CacheSearchRow, CacheDataRow>
{
         initTree(initNew);
     }
 
+    /**
+     * @param grp Cache group.
+     * @return Tree inner IO.
+     */
     private static IOVersions<? extends AbstractDataInnerIO> innerIO(CacheGroupContext
grp) {
         if (grp.mvccEnabled())
             return MvccDataInnerIO.VERSIONS;
@@ -89,6 +93,10 @@ public class CacheDataTree extends BPlusTree<CacheSearchRow, CacheDataRow>
{
         return grp.sharedGroup() ? CacheIdAwareDataInnerIO.VERSIONS : DataInnerIO.VERSIONS;
     }
 
+    /**
+     * @param grp Cache group.
+     * @return Tree leaf IO.
+     */
     private static IOVersions<? extends AbstractDataLeafIO> leafIO(CacheGroupContext
grp) {
         if (grp.mvccEnabled())
             return MvccDataLeafIO.VERSIONS;
@@ -167,14 +175,21 @@ public class CacheDataTree extends BPlusTree<CacheSearchRow, CacheDataRow>
{
     /** {@inheritDoc} */
     @Override protected CacheDataRow getRow(BPlusIO<CacheSearchRow> io, long pageAddr,
int idx, Object flags)
         throws IgniteCheckedException {
-        long link = ((RowLinkIO)io).getLink(pageAddr, idx);
-        int hash = ((RowLinkIO)io).getHash(pageAddr, idx);
-        int cacheId = ((RowLinkIO)io).getCacheId(pageAddr, idx);
+        RowLinkIO rowIo = (RowLinkIO)io;
+
+        long link = rowIo.getLink(pageAddr, idx);
+        int hash = rowIo.getHash(pageAddr, idx);
+        int cacheId = rowIo.getCacheId(pageAddr, idx);
 
         CacheDataRowAdapter.RowData x = flags != null ?
             (CacheDataRowAdapter.RowData)flags :
             CacheDataRowAdapter.RowData.FULL;
 
+//        if (grp.mvccEnabled()) {
+//            long mvccTopVer = rowIo.getMvccUpdateTopologyVersion(pageAddr, idx);
+//            long mvcCntr = rowIo.getMvccUpdateCounter(pageAddr, idx);
+//        }
+
         return rowStore.dataRow(cacheId, hash, link, x);
     }
 


Mime
View raw message