ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [49/50] ignite git commit: ignite-db - cursor fix
Date Thu, 28 Apr 2016 08:53:19 GMT
ignite-db - cursor fix


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

Branch: refs/heads/ignite-db-x-10884
Commit: 06feabe9e3e133f71dcbb9e0cc5b3233cc21a8e2
Parents: 2895696
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Wed Apr 27 11:10:41 2016 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Wed Apr 27 11:10:41 2016 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/database/tree/BPlusTree.java       | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/06feabe9/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 c0144a7..cccb880 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
@@ -2566,7 +2566,9 @@ public abstract class BPlusTree<L, T extends L> {
                         int cmp = compare(io, buf, cnt - 1, upperBound);
 
                         if (cmp > 0) {
-                            cnt = findInsertionPoint(io, buf, cnt, upperBound) + 1;
+                            int idx = findInsertionPoint(io, buf, cnt, upperBound);
+
+                            cnt = idx < 0 ? -idx : idx + 1;
 
                             fwdId = 0; // The End.
                         }


Mime
View raw message