This is an automated email from the ASF dual-hosted git repository.
sergey-chugunov-1985 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 70f53e31c10 IGNITE-28698 Allow distributed processes during rolling
upgrade (#13152)
70f53e31c10 is described below
commit 70f53e31c10e976b763f1edd525adb9004620cc0
Author: Aleksandr Chesnokov <[email protected]>
AuthorDate: Thu May 21 11:44:54 2026 +0300
IGNITE-28698 Allow distributed processes during rolling upgrade (#13152)
---
.../util/distributed/DistributedProcess.java | 11 +---
.../snapshot/IgniteSnapshotRollingUpgradeTest.java | 75 ----------------------
.../ignite/testsuites/IgniteSnapshotTestSuite.java | 2 -
3 files changed, 1 insertion(+), 87 deletions(-)
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/util/distributed/DistributedProcess.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/distributed/DistributedProcess.java
index 73298b6696e..f4aeb18fd28 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/util/distributed/DistributedProcess.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/util/distributed/DistributedProcess.java
@@ -26,7 +26,6 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.function.BiFunction;
import java.util.function.Function;
import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.IgniteException;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.failure.FailureContext;
@@ -38,7 +37,6 @@ import
org.apache.ignite.internal.managers.encryption.GridEncryptionManager;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager;
import org.apache.ignite.internal.util.GridConcurrentHashSet;
-import org.apache.ignite.internal.util.future.GridFinishedFuture;
import org.apache.ignite.internal.util.future.GridFutureAdapter;
import org.apache.ignite.internal.util.typedef.CI3;
import org.apache.ignite.internal.util.typedef.F;
@@ -152,14 +150,7 @@ public class DistributedProcess<I extends Message, R
extends Message> {
initCoordinator(p, topVer);
try {
- IgniteInternalFuture<R> fut;
-
- if (ctx.rollingUpgrade().enabled()) {
- fut = new GridFinishedFuture<>(new IgniteException("Failed
to start distributed process "
- + type + ": rolling upgrade is enabled"));
- }
- else
- fut = exec.apply((I)msg.request());
+ IgniteInternalFuture<R> fut = exec.apply((I)msg.request());
fut.listen(() -> {
if (fut.error() != null)
diff --git
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotRollingUpgradeTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotRollingUpgradeTest.java
deleted file mode 100644
index aa4b7e6fefd..00000000000
---
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotRollingUpgradeTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.persistence.snapshot;
-
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.cluster.ClusterState;
-import org.apache.ignite.configuration.DataRegionConfiguration;
-import org.apache.ignite.configuration.DataStorageConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.IgniteEx;
-import org.apache.ignite.lang.IgniteProductVersion;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-import org.junit.Test;
-
-import static
org.apache.ignite.testframework.GridTestUtils.assertThrowsWithCause;
-
-/** */
-public class IgniteSnapshotRollingUpgradeTest extends GridCommonAbstractTest {
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String
igniteInstanceName) throws Exception {
- IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
- cfg.setDataStorageConfiguration(new DataStorageConfiguration()
- .setDefaultDataRegionConfiguration(new
DataRegionConfiguration().setPersistenceEnabled(true)));
-
- return cfg;
- }
-
- /** {@inheritDoc} */
- @Override protected void afterTest() throws Exception {
- stopAllGrids();
-
- cleanPersistenceDir();
- }
-
- /** Tests that snapshot creation fails when rolling upgrade is enabled. */
- @Test
- public void testSnapshotCreationFailsDuringRollingUpgrade() throws
Exception {
- IgniteEx srv = startGrid(0);
-
- srv.cluster().state(ClusterState.ACTIVE);
-
- IgniteProductVersion curVer =
srv.context().discovery().localNode().version();
-
- IgniteProductVersion targetVer =
IgniteProductVersion.fromString(curVer.major()
- + "." + curVer.minor()
- + "." + curVer.maintenance() + 1);
-
- srv.context().rollingUpgrade().enable(targetVer, false);
-
- assertTrue(srv.context().rollingUpgrade().enabled());
-
- Throwable ex = assertThrowsWithCause(
- () -> srv.snapshot().createSnapshot("test").get(getTestTimeout()),
- IgniteException.class
- );
-
- assertTrue(ex.getMessage().contains("Failed to start distributed
process START_SNAPSHOT: rolling upgrade is enabled"));
- }
-}
diff --git
a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSnapshotTestSuite.java
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSnapshotTestSuite.java
index 75f4a6d9392..83a0f0eceb0 100644
---
a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSnapshotTestSuite.java
+++
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSnapshotTestSuite.java
@@ -25,7 +25,6 @@ import
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSn
import
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotRemoteRequestTest;
import
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotRestoreFromRemoteMdcTest;
import
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotRestoreFromRemoteTest;
-import
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotRollingUpgradeTest;
import
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotWithMetastorageTest;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.DynamicSuite;
@@ -50,7 +49,6 @@ public class IgniteSnapshotTestSuite {
GridTestUtils.addTestIfNeeded(suite,
IgniteSnapshotRemoteRequestTest.class, ignoredTests);
GridTestUtils.addTestIfNeeded(suite,
IgniteSnapshotRestoreFromRemoteMdcTest.class, ignoredTests);
GridTestUtils.addTestIfNeeded(suite,
IgniteSnapshotRestoreFromRemoteTest.class, ignoredTests);
- GridTestUtils.addTestIfNeeded(suite,
IgniteSnapshotRollingUpgradeTest.class, ignoredTests);
GridTestUtils.addTestIfNeeded(suite,
IgniteSnapshotWithMetastorageTest.class, ignoredTests);
}
}