This is an automated email from the ASF dual-hosted git repository.

namelchev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 476a6580907 IGNITE-19380 Fixed NPE on snapshot create operation for 
in-memory cluster (#10674)
476a6580907 is described below

commit 476a65809077bdc95f01cfdef03f4409e1a54244
Author: Nikita Amelchev <[email protected]>
AuthorDate: Fri Apr 28 23:17:32 2023 +0300

    IGNITE-19380 Fixed NPE on snapshot create operation for in-memory cluster 
(#10674)
---
 .../cache/persistence/snapshot/IgniteSnapshotManager.java      | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java
index e7a655ae177..54aefb66505 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java
@@ -898,11 +898,6 @@ public class IgniteSnapshotManager extends 
GridCacheSharedManagerAdapter
         if (!CU.baselineNode(cctx.localNode(), 
cctx.kernalContext().state().clusterState()))
             return new GridFinishedFuture<>();
 
-        if (!CU.isPersistenceEnabled(cctx.gridConfig())) {
-            throw new IgniteException("Create snapshot request has been 
rejected. Snapshots on an in-memory " +
-                "clusters are not allowed.");
-        }
-
         Set<UUID> leftNodes = new HashSet<>(req.nodes());
         
leftNodes.removeAll(F.viewReadOnly(cctx.discovery().serverNodes(AffinityTopologyVersion.NONE),
             F.node2id()));
@@ -2159,6 +2154,11 @@ public class IgniteSnapshotManager extends 
GridCacheSharedManagerAdapter
                     ));
             }
 
+            if (!CU.isPersistenceEnabled(cctx.gridConfig())) {
+                throw new IgniteException("Create snapshot request has been 
rejected. " +
+                    "Snapshots on an in-memory clusters are not allowed.");
+            }
+
             ClusterSnapshotFuture snpFut0;
             int incIdx = -1;
 

Reply via email to