boolean prune(final Key key1, final Key key2) throws PersistitException {
        Buffer buffer = null;
        boolean pruned = false;

        Debug.$assert1.t(_tree.isValid());
        try {
            search(key1, true);
            buffer = _levelCache[0]._buffer;

            while (buffer != null) {
                checkPageType(buffer, Buffer.PAGE_TYPE_DATA, false);
                pruned |= buffer.pruneMvvValues(_tree, true);
                final int foundAt = buffer.findKey(key2);
                if (!buffer.isAfterRightEdge(foundAt)) {
                    break;
                }
                Buffer oldBuffer = buffer;
                final long rightPageAddress = buffer.getRightSibling();
                if (rightPageAddress == 0) {
                    break;
                }
                buffer = _pool.get(_volume, buffer.getRightSibling(), true, true);
                oldBuffer.release();
            }

        } finally {
            if (buffer != null) {
                buffer.release();
            }
        }
        return pruned;
    }