Vladsz83 commented on code in PR #11346:
URL: https://github.com/apache/ignite/pull/11346#discussion_r1602018435


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotRestoreProcess.java:
##########
@@ -402,12 +402,8 @@ public IgniteFutureImpl<Void> start(
                 return;
             }
 
-            if (!reqGrpIds.isEmpty()) {
-                finishProcess(fut0.rqId, new 
IllegalArgumentException(OP_REJECT_MSG + "Cache group(s) was not " +
-                    "found in the snapshot [groups=" + reqGrpIds.values() + ", 
snapshot=" + snpName + ']'));
-
-                return;
-            }
+            assert reqGrpIds.isEmpty() : "Cache group(s) was not found in the 
snapshot [groups=" + reqGrpIds.values()

Review Comment:
   > Why this change from exception to assert?
   
   Because this duplicates the check within 
MetadataVerificationJob#checkMeta(SnapshotMetadata meta) and must not occure 
here.



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