tkalkirill commented on code in PR #1313:
URL: https://github.com/apache/ignite-3/pull/1313#discussion_r1013994555
##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/storage/state/TxStateTableStorage.java:
##########
@@ -78,4 +75,49 @@ public interface TxStateTableStorage extends AutoCloseable {
* @throws StorageException In case when the operation has failed.
*/
void destroy() throws StorageException;
+
+ /**
+ * Prepares the transaction state storage for rebalancing: makes a backup
of the current transaction state storage and creates a new
+ * storage.
+ *
+ * <p>This method must be called before every full rebalance of the
transaction state storage, so that in case of errors or cancellation
+ * of the full rebalance, we can restore the transaction state storage
from the backup.
+ *
+ * <p>Full rebalance will be completed when one of the methods is called:
+ * <ol>
+ * <li>{@link #abortRebalance(int)} - in case of a full rebalance
cancellation or failure, so that we can restore the transaction
+ * state storage from a backup;</li>
+ * <li>{@link #finishRebalance(int)} - in case of a successful full
rebalance, to remove the backup of the transaction state
+ * storage.</li>
+ * </ol>
+ *
+ * <p>Only modification of data in transaction state storage is allowed.
+ *
+ * @param partitionId Partition ID.
+ * @return Future, if completed without errors, then {@link
#getTxStateStorage} will return a new (empty) transaction state storage.
Review Comment:
`Future, if completed without errors, then {@link #getTxStateStorage} will
return write only (empty) transaction state storage.`
Fine ?
--
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]