tkalkirill commented on code in PR #1578:
URL: https://github.com/apache/ignite-3/pull/1578#discussion_r1088165648
##########
modules/storage-api/src/main/java/org/apache/ignite/internal/storage/engine/MvTableStorage.java:
##########
@@ -257,4 +258,27 @@ CompletableFuture<Void> finishRebalancePartition(
long lastAppliedTerm,
RaftGroupConfiguration raftGroupConfig
);
+
+ /**
+ * Clears a partition and all associated indices.
+ * <ul>
+ * <li>Cancels all current operations (including cursors) of a {@link
MvPartitionStorage multi-version partition storage} and its
+ * associated indexes ({@link HashIndexStorage} and {@link
SortedIndexStorage}) and waits for their completion;</li>
+ * <li>Does not allow operations to be performed (exceptions will be
thrown) of a multi-version partition storage and its indexes
+ * until the cleaning is completed;</li>
+ * <li>Clear a multi-version partition storage and its indexes;</li>
+ * <li>Sets {@link MvPartitionStorage#lastAppliedIndex()}, {@link
MvPartitionStorage#lastAppliedTerm()},
+ * {@link MvPartitionStorage#persistedIndex()} to {@code 0} and {@link
MvPartitionStorage#committedGroupConfiguration()} to
+ * {@code null};</li>
+ * <li>Once cleanup a multi-version partition storage and its indexes
is complete (success or error), allows to perform all with a
+ * multi-version partition storage and its indexes.</li>
+ * </ul>
+ *
+ * @return Future of cleanup a multi-version partition storage and its
indexes.
Review Comment:
fix
--
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]