Vladsz83 commented on a change in pull request #9313:
URL: https://github.com/apache/ignite/pull/9313#discussion_r699717497



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java
##########
@@ -993,8 +1008,19 @@ public void cancelLocalSnapshotTask(String name) {
                     grps.stream().collect(Collectors.toMap(CU::cacheId, v -> 
v));
 
                 for (List<SnapshotMetadata> nodeMetas : metas.values()) {
-                    for (SnapshotMetadata meta : nodeMetas)
+                    for (SnapshotMetadata meta : nodeMetas) {
+                        if (meta.masterKeyDigest() != null && 
!Arrays.equals(meta.masterKeyDigest(),
+                            
kctx0.config().getEncryptionSpi().masterKeyDigest())) {

Review comment:
       "It's possible to get NPE for 
kctx0.config().getEncryptionSpi().masterKeyDigest() for config with disabled 
encryption." Impossible. Toy can find `if (cfg.getEncryptionSpi() == null)
                   cfg.setEncryptionSpi(new NoopEncryptionSpi());` in 
IgniteEx.initializeDefaultSpi() and in 
`EncryptedSnapshotTest.testValidatingSnapshotFailsWithNoEncryption`




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