ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: Tree meta page.
Date Thu, 12 Jan 2017 11:48:33 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-gg-11810-1 cc32779c5 -> acaccb3d3


Tree meta page.


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

Branch: refs/heads/ignite-gg-11810-1
Commit: acaccb3d31e11dfcce95983c7af03840b8c45b8e
Parents: cc32779
Author: sboikov <sboikov@gridgain.com>
Authored: Thu Jan 12 14:48:37 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Thu Jan 12 14:48:37 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/database/tree/BPlusTree.java     | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/acaccb3d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/BPlusTree.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/BPlusTree.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/BPlusTree.java
index b77ea50..7cf829e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/BPlusTree.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/BPlusTree.java
@@ -948,7 +948,7 @@ public abstract class BPlusTree<L, T extends L> extends DataStructure
implements
 
             rootPageId = getFirstPageId(meta, rootLvl);
 
-            validateDownPages(meta, rootPageId, 0L, rootLvl);
+            validateDownPages(rootPageId, 0L, rootLvl);
 
             validateDownKeys(rootPageId, null);
         }
@@ -1099,13 +1099,12 @@ public abstract class BPlusTree<L, T extends L> extends DataStructure
implements
     }
 
     /**
-     * @param meta Meta page.
      * @param pageId Page ID.
      * @param fwdId Forward ID.
      * @param lvl Level.
      * @throws IgniteCheckedException If failed.
      */
-    private void validateDownPages(Page meta, long pageId, long fwdId, final int lvl) throws
IgniteCheckedException {
+    private void validateDownPages(long pageId, long fwdId, final int lvl) throws IgniteCheckedException
{
         try (Page page = page(pageId)) {
             long pageAddr = readLock(page); // No correctness guaranties.
 
@@ -1137,7 +1136,7 @@ public abstract class BPlusTree<L, T extends L> extends DataStructure
implements
                 else {
                     // Recursively go down if we are on inner level.
                     for (int i = 0; i < cnt; i++)
-                        validateDownPages(meta, inner(io).getLeft(pageAddr, i), inner(io).getRight(pageAddr,
i), lvl - 1);
+                        validateDownPages(inner(io).getLeft(pageAddr, i), inner(io).getRight(pageAddr,
i), lvl - 1);
 
                     if (fwdId != 0) {
                         // For the rightmost child ask neighbor.
@@ -1158,7 +1157,7 @@ public abstract class BPlusTree<L, T extends L> extends DataStructure
implements
 
                     pageId = inner(io).getLeft(pageAddr, cnt); // The same as io.getRight(cnt
- 1) but works for routing pages.
 
-                    validateDownPages(meta, pageId, fwdId, lvl - 1);
+                    validateDownPages(pageId, fwdId, lvl - 1);
                 }
             }
             finally {
@@ -1961,10 +1960,7 @@ public abstract class BPlusTree<L, T extends L> extends DataStructure
implements
 
             assert meta0 != null;
 
-            rootLvl = meta0.rootLvl;
-            rootId = meta0.rootId;
-
-            restartFromRoot(rootId, rootLvl, globalRmvId.get());
+            restartFromRoot(meta0.rootId, meta0.rootLvl, globalRmvId.get());
         }
 
         /**


Mime
View raw message