tkalkirill commented on code in PR #2155:
URL: https://github.com/apache/ignite-3/pull/2155#discussion_r1221075045
##########
modules/storage-api/src/main/java/org/apache/ignite/internal/storage/util/StorageOperation.java:
##########
@@ -109,6 +109,34 @@ String inProcessErrorMessage(String storageInfo) {
* Storage rebalancing start operation.
*/
static class StartRebalanceStorageOperation extends StorageOperation {
+ private final AtomicReference<AbortRebalanceStorageOperation>
abortRebalanceOperation = new AtomicReference<>();
+
+ private final CompletableFuture<Void> startRebalanceFuture = new
CompletableFuture<>();
+
+ /**
+ * Attempts to set the abort rebalance operation.
+ *
+ * @param abortRebalanceOperation Abort rebalance operation.
+ * @return {@code True} if the operation was set by current method
invocation, {@code false} if by another method invocation.
+ */
+ boolean setAbortOperation(AbortRebalanceStorageOperation
abortRebalanceOperation) {
+ return this.abortRebalanceOperation.compareAndSet(null,
abortRebalanceOperation);
+ }
+
+ /**
+ * Returns {@link #setAbortOperation(AbortRebalanceStorageOperation)
set} a abort rebalance operation.
Review Comment:
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]