You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by db...@apache.org on 2016/05/02 04:33:00 UTC
cassandra git commit: push down btree keyEnd fetching to where it's
needed"
Repository: cassandra
Updated Branches:
refs/heads/trunk fc40cb181 -> 7b42636a7
push down btree keyEnd fetching to where it's needed"
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7b42636a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7b42636a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7b42636a
Branch: refs/heads/trunk
Commit: 7b42636a790fb23478faeff25821b59c9d3738e8
Parents: fc40cb1
Author: Dave Brosius <db...@mebigfatguy.com>
Authored: Sun May 1 22:27:13 2016 -0400
Committer: Dave Brosius <db...@mebigfatguy.com>
Committed: Sun May 1 22:27:13 2016 -0400
----------------------------------------------------------------------
src/java/org/apache/cassandra/utils/btree/BTreeRemoval.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/7b42636a/src/java/org/apache/cassandra/utils/btree/BTreeRemoval.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/btree/BTreeRemoval.java b/src/java/org/apache/cassandra/utils/btree/BTreeRemoval.java
index a4402b8..b72214f 100644
--- a/src/java/org/apache/cassandra/utils/btree/BTreeRemoval.java
+++ b/src/java/org/apache/cassandra/utils/btree/BTreeRemoval.java
@@ -225,12 +225,16 @@ public class BTreeRemoval
private static Object[] copyWithKeyAndChildRemoved(final Object[] node, final int keyIndex, final int childIndex, final boolean substractSize)
{
final boolean leaf = BTree.isLeaf(node);
- final int keyEnd = BTree.getKeyEnd(node);
final Object[] newNode;
if (leaf)
+ {
+ final int keyEnd = BTree.getKeyEnd(node);
newNode = new Object[keyEnd - ((keyEnd & 1) == 1 ? 0 : 1)];
+ }
else
+ {
newNode = new Object[node.length - 2];
+ }
int offset = copyKeys(node, newNode, 0, keyIndex);
if (!leaf)
{