ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [14/17] ignite git commit: ignite-4652 - b+tree finished
Date Thu, 16 Feb 2017 14:41:06 GMT
ignite-4652 - b+tree finished


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

Branch: refs/heads/ignite-4652
Commit: a6e2569e0834593ff79e8522a203e9a97d0bcf96
Parents: 607e418
Author: Sergi Vladykin <sergi.vladykin@gmail.com>
Authored: Wed Feb 15 19:36:03 2017 +0300
Committer: Sergi Vladykin <sergi.vladykin@gmail.com>
Committed: Wed Feb 15 19:36:03 2017 +0300

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


http://git-wip-us.apache.org/repos/asf/ignite/blob/a6e2569e/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 904d91e..5971844 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
@@ -363,7 +363,10 @@ public abstract class BPlusTree<L, T extends L> extends DataStructure
implements
                     // Can happen only for invoke, otherwise inner key must be replaced on
the way down.
                     assert p.invoke;
 
-                    p.needReplaceInner = TRUE;
+                    // We need to restart the operation from root to perform inner replace.
+                    // On the second pass we will not get here (will avoid infinite loop)
because
+                    // needReplaceInner will be DONE or our key will not be the rightmost
anymore.
+                    return RETRY_ROOT;
                 }
                 else
                     p.finish();
@@ -1515,7 +1518,7 @@ public abstract class BPlusTree<L, T extends L> extends DataStructure
implements
                             continue;
                         }
 
-                        // Put does insert on the same level.
+                        // Unfinished Put does insertion on the same level.
                         if (x.isPut())
                             continue;
 


Mime
View raw message