You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ni...@apache.org on 2025/01/09 07:32:54 UTC

(ignite) branch master updated: IGNITE-24085 Remove CACHE_ENCRYPTION_SINCE (#11789)

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

nizhikov 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 90d1483fd93 IGNITE-24085 Remove CACHE_ENCRYPTION_SINCE (#11789)
90d1483fd93 is described below

commit 90d1483fd930574e0e54a782e041eb3b9949a8f9
Author: Maksim Davydov <70...@users.noreply.github.com>
AuthorDate: Thu Jan 9 10:32:46 2025 +0300

    IGNITE-24085 Remove CACHE_ENCRYPTION_SINCE (#11789)
---
 .../managers/encryption/GridEncryptionManager.java | 22 ----------------------
 .../processors/cache/GridCacheProcessor.java       |  5 +----
 2 files changed, 1 insertion(+), 26 deletions(-)

diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/encryption/GridEncryptionManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/encryption/GridEncryptionManager.java
index 3cf84cafd17..78b533b1c46 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/encryption/GridEncryptionManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/encryption/GridEncryptionManager.java
@@ -70,7 +70,6 @@ import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteFuture;
 import org.apache.ignite.lang.IgniteFutureCancelledException;
-import org.apache.ignite.lang.IgniteProductVersion;
 import org.apache.ignite.lang.IgniteUuid;
 import org.apache.ignite.spi.IgniteNodeValidationResult;
 import org.apache.ignite.spi.IgniteSpiException;
@@ -136,11 +135,6 @@ import static org.apache.ignite.internal.util.distributed.DistributedProcess.Dis
  */
 public class GridEncryptionManager extends GridManagerAdapter<EncryptionSpi> implements EncryptionCacheKeyProvider,
     MetastorageLifecycleListener, IgniteChangeGlobalStateSupport, IgniteEncryption, PartitionsExchangeAware {
-    /**
-     * Cache encryption introduced in this Ignite version.
-     */
-    private static final IgniteProductVersion CACHE_ENCRYPTION_SINCE = IgniteProductVersion.fromString("2.7.0");
-
     /** Prefix for a master key name. */
     public static final String MASTER_KEY_NAME_PREFIX = "encryption-master-key-name";
 
@@ -1339,22 +1333,6 @@ public class GridEncryptionManager extends GridManagerAdapter<EncryptionSpi> imp
         }
     }
 
-    /**
-     * Checks cache encryption supported by all nodes in cluster.
-     *
-     * @throws IgniteCheckedException If check fails.
-     */
-    public void checkEncryptedCacheSupported() throws IgniteCheckedException {
-        Collection<ClusterNode> nodes = ctx.grid().cluster().nodes();
-
-        for (ClusterNode node : nodes) {
-            if (CACHE_ENCRYPTION_SINCE.compareTo(node.version()) > 0) {
-                throw new IgniteCheckedException("All nodes in cluster should be 2.7.0 or greater " +
-                    "to create encrypted cache! [nodeId=" + node.id() + "]");
-            }
-        }
-    }
-
     /** {@inheritDoc} */
     @Override public DiscoveryDataExchangeType discoveryDataType() {
         return ENCRYPTION_MGR;
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 02fcca5b26a..585125c2449 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -3548,11 +3548,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
             };
 
         try {
-            if (ccfg != null && ccfg.isEncryptionEnabled()) {
-                ctx.encryption().checkEncryptedCacheSupported();
-
+            if (ccfg != null && ccfg.isEncryptionEnabled())
                 return generateEncryptionKeysAndStartCacheAfter(1, startCacheClsr);
-            }
 
             return startCacheClsr.apply(Collections.EMPTY_SET, null);
         }