tkalkirill commented on code in PR #1286:
URL: https://github.com/apache/ignite-3/pull/1286#discussion_r1010761336
##########
modules/storage-api/src/main/java/org/apache/ignite/internal/storage/engine/MvTableStorage.java:
##########
@@ -162,4 +163,32 @@ default IndexStorage getOrCreateIndex(int partitionId,
UUID indexId) {
* @throws StorageException If an error has occurred during the
destruction of the storage.
*/
void destroy() throws StorageException;
+
+ /**
+ * Prepares the partition storage for rebalancing: makes a backup and
creates a new one.
+ *
+ * @param partitionId Partition ID.
+ * @param executor Executor.
+ * @return Future, if completed without errors, then {@link
#getMvPartition} will return a new (empty) partition storage.
+ */
+ CompletableFuture<Void> startRebalanceMvPartition(int partitionId,
Executor executor);
+
+ /**
+ * Aborts rebalancing of the partition storage if it was started: restores
the backup and deletes the new one.
+ *
+ * @param partitionId Partition ID.
+ * @param executor Executor.
+ * @return Future, upon completion of which (even if with an error) {@link
#getMvPartition} will return the partition storage restored
+ * from the backup.
+ */
+ CompletableFuture<Void> abortRebalanceMvPartition(int partitionId,
Executor executor);
+
+ /**
+ * Finishes a successful partition storage rebalance if it has been
started: deletes the backup and saves the new one.
Review Comment:
Tried to fix it
--
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]