You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/05/03 12:15:17 UTC

[GitHub] [ignite] NSAmelchev commented on a change in pull request #7767: IGNITE-12967: Start cluster snapshot from client node

NSAmelchev commented on a change in pull request #7767:
URL: https://github.com/apache/ignite/pull/7767#discussion_r419095087



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java
##########
@@ -648,6 +648,13 @@ public boolean isSnapshotCreating() {
             if (!clusterState.hasBaselineTopology())
                 throw new IgniteException("Snapshot operation has been rejected. The baseline topology is not configured for cluster.");
 
+            if (cctx.kernalContext().clientNode()) {
+                return cctx.kernalContext().grid()
+                    .compute(cctx.kernalContext().grid().cluster()
+                        .forNodeId(U.oldest(cctx.kernalContext().discovery().aliveServerNodes(), null).id()))

Review comment:
       If oldest node left cluster user will get not clear exception. What it mean?  Snapshot will be created or not? What user should to do? I suggest to clarify public exceptions.
   For now, exception looks like:
   ```
   class org.apache.ignite.cluster.ClusterGroupEmptyException: Cluster group is empty.
   	at org.apache.ignite.internal.util.IgniteUtils$6.apply(IgniteUtils.java:921)
   	at org.apache.ignite.internal.util.IgniteUtils$6.apply(IgniteUtils.java:919)
   	at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:1077)
   	at org.apache.ignite.internal.util.future.IgniteFutureImpl.convertException(IgniteFutureImpl.java:168)
   	at org.apache.ignite.internal.util.future.IgniteFutureImpl.get(IgniteFutureImpl.java:137)
   	at org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteClusterSnapshotSelfTest.testClusterSnapshotFromClientNodeStop(IgniteClusterSnapshotSelfTest.java:887)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
   	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
   	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
   	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
   	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
   	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
   	at org.apache.ignite.testframework.junits.GridAbstractTest$7.run(GridAbstractTest.java:2213)
   	at java.lang.Thread.run(Thread.java:748)
   Caused by: class org.apache.ignite.internal.cluster.ClusterGroupEmptyCheckedException: Cluster group is empty.
   	at org.apache.ignite.internal.util.IgniteUtils.emptyTopologyException(IgniteUtils.java:5062)
   	at org.apache.ignite.internal.processors.closure.GridClosureProcessor.callAsync(GridClosureProcessor.java:694)
   	at org.apache.ignite.internal.IgniteComputeImpl.applyAsync0(IgniteComputeImpl.java:773)
   	at org.apache.ignite.internal.IgniteComputeImpl.applyAsync(IgniteComputeImpl.java:757)
   	at org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager.createSnapshot(IgniteSnapshotManager.java:659)
   	at org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteClusterSnapshotSelfTest.lambda$testClusterSnapshotFromClientNodeStop$15(IgniteClusterSnapshotSelfTest.java:883)
   	at org.apache.ignite.testframework.GridTestUtils.lambda$runAsync$2(GridTestUtils.java:1153)
   	at org.apache.ignite.testframework.GridTestUtils$7.call(GridTestUtils.java:1474)
   	at org.apache.ignite.testframework.GridTestThread.run(GridTestThread.java:84)
   ```




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org