/** * Returns true if non-leaf is not split and underutilized. If so, it should be * merged with its neighbors, and possibly deleted. Caller must hold any latch. */ boolean shouldInternalMerge() { return shouldMerge(availableInternalBytes()); }
/** * Returns true if non-leaf is not split and underutilized. If so, it should be * merged with its neighbors, and possibly deleted. Caller must hold any latch. */ boolean shouldInternalMerge() { return shouldMerge(availableInternalBytes()); }
/** * Returns true if non-leaf is not split and underutilized. If so, it should be * merged with its neighbors, and possibly deleted. Caller must hold any latch. */ boolean shouldInternalMerge() { return shouldMerge(availableInternalBytes()); }
/** * Caller must hold any latch. */ int availableBytes() { return isLeaf() ? availableLeafBytes() : availableInternalBytes(); }
/** * Caller must hold any latch. */ int availableBytes() { return isLeaf() ? availableLeafBytes() : availableInternalBytes(); }
/** * Caller must hold any latch. */ int availableBytes() { return isLeaf() ? availableLeafBytes() : availableInternalBytes(); }
if (!node.shouldMerge(nodeAvail = node.availableInternalBytes())) { if (leftNode != null) { leftNode.releaseExclusive(); leftAvail = leftNode.availableInternalBytes(); int rightAvail = rightNode == null ? -1 : rightNode.availableInternalBytes();
if (!node.shouldMerge(nodeAvail = node.availableInternalBytes())) { node.releaseExclusive(); parentNode.releaseExclusive(); leftAvail = leftNode.availableInternalBytes(); int rightAvail = rightNode == null ? -1 : rightNode.availableInternalBytes();
if (!node.shouldMerge(nodeAvail = node.availableInternalBytes())) { node.releaseExclusive(); parentNode.releaseExclusive(); leftAvail = leftNode.availableInternalBytes(); int rightAvail = rightNode == null ? -1 : rightNode.availableInternalBytes();
try { scalar = node.numKeys() + 1; // internal nodes have +1 children availBytes = node.availableInternalBytes(); pageSize = pageSize(node.mPage); frame = frame.pop();
try { scalar = node.numKeys() + 1; // internal nodes have +1 children availBytes = node.availableInternalBytes(); pageSize = pageSize(node.mPage); frame = frame.pop();
try { scalar = node.numKeys() + 1; // internal nodes have +1 children availBytes = node.availableInternalBytes(); pageSize = pageSize(node.mPage); frame = frame.pop();
int rootEntryLen = Node.keyLengthAtLoc(rootPage, rootEntryLoc); int leftAvail = leftNode.availableInternalBytes(); int rightAvail = rightNode.availableInternalBytes();
int rightAvail = right.availableInternalBytes(); if (rightAvail >= rightGrowth) { parentKeyLen = keyLengthAtLoc(parentPage, parentKeyLoc); parentKeyGrowth = searchKeyLen - parentKeyLen; if (parentKeyGrowth <= 0 || parentKeyGrowth <= parent.availableInternalBytes()) {
int leftAvail = left.availableInternalBytes(); if (leftAvail >= leftGrowth) { parentKeyLen = keyLengthAtLoc(parentPage, parentKeyLoc); parentKeyGrowth = searchKeyLen - parentKeyLen; if (parentKeyGrowth <= 0 || parentKeyGrowth <= parent.availableInternalBytes()) {
int rightAvail = right.availableInternalBytes(); if (rightAvail >= rightGrowth) { parentKeyLen = keyLengthAtLoc(parentPage, parentKeyLoc); parentKeyGrowth = searchKeyLen - parentKeyLen; if (parentKeyGrowth <= 0 || parentKeyGrowth <= parent.availableInternalBytes()) {
parentKeyGrowth = newKeyLen - keyLengthAtLoc(parentPage, parentKeyLoc); if (parentKeyGrowth <= 0 || parentKeyGrowth <= parent.availableInternalBytes())
parentKeyGrowth = newKeyLen - keyLengthAtLoc(parentPage, parentKeyLoc); if (parentKeyGrowth <= 0 || parentKeyGrowth <= parent.availableInternalBytes())
parentKeyGrowth = newKeyLen - keyLengthAtLoc(parentPage, parentKeyLoc); if (parentKeyGrowth <= 0 || parentKeyGrowth <= parent.availableInternalBytes())
parentKeyGrowth = newKeyLen - keyLengthAtLoc(parentPage, parentKeyLoc); if (parentKeyGrowth <= 0 || parentKeyGrowth <= parent.availableInternalBytes())