xtern commented on code in PR #9992:
URL: https://github.com/apache/ignite/pull/9992#discussion_r883648957
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/BPlusTree.java:
##########
@@ -6347,4 +6491,137 @@ protected String lockRetryErrorMessage(String op) {
getClass().getSimpleName() + " [grpName=" + grpName + ",
treeName=" + name() + ", metaPageId=" +
U.hexLong(metaPageId) + "].";
}
+
+ /**
+ * The operation of deleting a range of values.
+ * <p>
+ * Performs the removal of several elements from the leaf at once.
+ */
+ protected class RemoveRange extends Remove {
+ /** Upper bound. */
+ private final L upper;
+
+ /** Lower bound. */
+ private final L lower;
+
+ /** List of removed rows. */
+ private final List<L> removedRows;
+
+ /** The number of remaining rows to remove ({@code -1}, if the limit
hasn't been specified). */
+ private int remaining;
+
+ /** Flag indicating that no more rows were found from the specified
range. */
+ private boolean completed;
+
+ /** The index of the highest row found on the page from the specified
range. */
+ private int highIdx;
+
+ /**
+ * @param lower Lower bound (inclusive).
+ * @param upper Upper bound (inclusive).
+ * @param needOld {@code True} If need return old value.
+ */
+ protected RemoveRange(L lower, L upper, boolean needOld, int limit) {
+ super(lower, needOld, rmvRangeFromLeaf);
+
+ this.lower = lower;
+ this.upper = upper;
+
+ remaining = limit <= 0 ? -1 : limit;
+ removedRows = needOld ? new LinkedList<>() : null;
Review Comment:
Done
##########
modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java:
##########
@@ -439,13 +465,13 @@ public void testPutRemove_1_20_pp_1() throws
IgniteCheckedException {
* @throws IgniteCheckedException If failed.
*/
@Test
- public void testPutRemove_1_20_pp_0() throws IgniteCheckedException {
Review Comment:
Fixed, thanks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]