Skip to content

Commit 90d1483

Browse files
authored
IGNITE-24085 Remove CACHE_ENCRYPTION_SINCE (#11789)
1 parent ce088bb commit 90d1483

File tree

2 files changed

+1
-26
lines changed

2 files changed

+1
-26
lines changed

modules/core/src/main/java/org/apache/ignite/internal/managers/encryption/GridEncryptionManager.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
import org.apache.ignite.internal.util.typedef.internal.U;
7171
import org.apache.ignite.lang.IgniteFuture;
7272
import org.apache.ignite.lang.IgniteFutureCancelledException;
73-
import org.apache.ignite.lang.IgniteProductVersion;
7473
import org.apache.ignite.lang.IgniteUuid;
7574
import org.apache.ignite.spi.IgniteNodeValidationResult;
7675
import org.apache.ignite.spi.IgniteSpiException;
@@ -136,11 +135,6 @@
136135
*/
137136
public class GridEncryptionManager extends GridManagerAdapter<EncryptionSpi> implements EncryptionCacheKeyProvider,
138137
MetastorageLifecycleListener, IgniteChangeGlobalStateSupport, IgniteEncryption, PartitionsExchangeAware {
139-
/**
140-
* Cache encryption introduced in this Ignite version.
141-
*/
142-
private static final IgniteProductVersion CACHE_ENCRYPTION_SINCE = IgniteProductVersion.fromString("2.7.0");
143-
144138
/** Prefix for a master key name. */
145139
public static final String MASTER_KEY_NAME_PREFIX = "encryption-master-key-name";
146140

@@ -1339,22 +1333,6 @@ private void writeTrackedWalIdxsToMetaStore() throws IgniteCheckedException {
13391333
}
13401334
}
13411335

1342-
/**
1343-
* Checks cache encryption supported by all nodes in cluster.
1344-
*
1345-
* @throws IgniteCheckedException If check fails.
1346-
*/
1347-
public void checkEncryptedCacheSupported() throws IgniteCheckedException {
1348-
Collection<ClusterNode> nodes = ctx.grid().cluster().nodes();
1349-
1350-
for (ClusterNode node : nodes) {
1351-
if (CACHE_ENCRYPTION_SINCE.compareTo(node.version()) > 0) {
1352-
throw new IgniteCheckedException("All nodes in cluster should be 2.7.0 or greater " +
1353-
"to create encrypted cache! [nodeId=" + node.id() + "]");
1354-
}
1355-
}
1356-
}
1357-
13581336
/** {@inheritDoc} */
13591337
@Override public DiscoveryDataExchangeType discoveryDataType() {
13601338
return ENCRYPTION_MGR;

modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3548,11 +3548,8 @@ public IgniteInternalFuture<Boolean> dynamicStartCache(
35483548
};
35493549

35503550
try {
3551-
if (ccfg != null && ccfg.isEncryptionEnabled()) {
3552-
ctx.encryption().checkEncryptedCacheSupported();
3553-
3551+
if (ccfg != null && ccfg.isEncryptionEnabled())
35543552
return generateEncryptionKeysAndStartCacheAfter(1, startCacheClsr);
3555-
}
35563553

35573554
return startCacheClsr.apply(Collections.EMPTY_SET, null);
35583555
}

0 commit comments

Comments
 (0)