zstan commented on code in PR #13577:
URL: https://github.com/apache/ignite/pull/13577#discussion_r4303442295


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotRestoreProcess.java:
##########
@@ -659,6 +659,11 @@ private 
IgniteInternalFuture<SnapshotRestoreOperationResponse> prepare(UUID igno
             if (snpMgr.isSnapshotCreating())
                 throw new IgniteCheckedException(OP_REJECT_MSG + "A cluster 
snapshot operation is in progress.");
 
+            if (snpMgr.isSnapshotDeleting(req.snapshotName(), 
req.snapshotPath())) {
+                throw new IgniteCheckedException(OP_REJECT_MSG + "A snapshot 
'" + req.snapshotName() +

Review Comment:
   Also a ask : 
   why `SnapshotRestoreProcess#prepare`  return `new GridFinishedFuture<>(new 
IgniteCheckedException`
   while 
   `SnapshotCheckProcess#prepareAndCheckMetas` return `new 
GridFinishedFuture<>(new IgniteIllegalStateException` ??



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotRestoreProcess.java:
##########
@@ -659,6 +659,11 @@ private 
IgniteInternalFuture<SnapshotRestoreOperationResponse> prepare(UUID igno
             if (snpMgr.isSnapshotCreating())
                 throw new IgniteCheckedException(OP_REJECT_MSG + "A cluster 
snapshot operation is in progress.");
 
+            if (snpMgr.isSnapshotDeleting(req.snapshotName(), 
req.snapshotPath())) {
+                throw new IgniteCheckedException(OP_REJECT_MSG + "A snapshot 
'" + req.snapshotName() +

Review Comment:
   Also I ask : 
   why `SnapshotRestoreProcess#prepare`  return `new GridFinishedFuture<>(new 
IgniteCheckedException`
   while 
   `SnapshotCheckProcess#prepareAndCheckMetas` return `new 
GridFinishedFuture<>(new IgniteIllegalStateException` ??



-- 
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]

Reply via email to