Skip to content

Commit 483ea0e

Browse files
authored
IGNITE-24086 Remove V_MERGE_CONFIG_SINCE (#11790)
1 parent 90d1483 commit 483ea0e

File tree

2 files changed

+2
-36
lines changed

2 files changed

+2
-36
lines changed

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

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
import org.apache.ignite.internal.IgniteInternalFuture;
5555
import org.apache.ignite.internal.IgniteNodeAttributes;
5656
import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
57-
import org.apache.ignite.internal.managers.discovery.DiscoCache;
5857
import org.apache.ignite.internal.managers.encryption.GridEncryptionManager;
5958
import org.apache.ignite.internal.managers.encryption.GroupKey;
6059
import org.apache.ignite.internal.managers.encryption.GroupKeyEncrypted;
@@ -78,7 +77,6 @@
7877
import org.apache.ignite.internal.util.typedef.internal.CU;
7978
import org.apache.ignite.internal.util.typedef.internal.U;
8079
import org.apache.ignite.lang.IgniteInClosure;
81-
import org.apache.ignite.lang.IgniteProductVersion;
8280
import org.apache.ignite.lang.IgniteUuid;
8381
import org.apache.ignite.plugin.CachePluginContext;
8482
import org.apache.ignite.plugin.CachePluginProvider;
@@ -116,9 +114,6 @@ public class ClusterCachesInfo {
116114
/** Representation of null for restarting caches map */
117115
private static final IgniteUuid NULL_OBJECT = new IgniteUuid();
118116

119-
/** Version since which merge of config is supports. */
120-
private static final IgniteProductVersion V_MERGE_CONFIG_SINCE = IgniteProductVersion.fromString("2.5.0");
121-
122117
/** */
123118
private final GridKernalContext ctx;
124119

@@ -1634,7 +1629,7 @@ else if (!GridFunc.eqNotOrdered(desc.schema().entities(), locQryEntities))
16341629
private void updateRegisteredCachesIfNeeded(Map<DynamicCacheDescriptor, QuerySchemaPatch> patchesToApply,
16351630
Collection<DynamicCacheDescriptor> cachesToSave, boolean hasSchemaPatchConflict) {
16361631
//Skip merge of config if least one conflict was found.
1637-
if (!hasSchemaPatchConflict && isMergeConfigSupports(ctx.discovery().localNode())) {
1632+
if (!hasSchemaPatchConflict) {
16381633
boolean isClusterActive = ctx.state().clusterState().active();
16391634

16401635
//Merge of config for cluster only for inactive grid.
@@ -2181,8 +2176,6 @@ private String processJoiningNode(CacheJoinNodeDiscoveryData joinData, UUID node
21812176
boolean hasSchemaPatchConflict = false;
21822177
boolean active = ctx.state().clusterState().active();
21832178

2184-
boolean isMergeCfgSupport = isMergeConfigSupports(null);
2185-
21862179
for (CacheJoinNodeDiscoveryData.CacheInfo cacheInfo : joinData.caches().values()) {
21872180
CacheConfiguration<?, ?> cfg = cacheInfo.cacheData().config();
21882181

@@ -2200,7 +2193,7 @@ private String processJoiningNode(CacheJoinNodeDiscoveryData joinData, UUID node
22002193

22012194
registerNewCache(joinData, nodeId, cacheInfo);
22022195
}
2203-
else if (!active && isMergeCfgSupport) {
2196+
else if (!active) {
22042197
DynamicCacheDescriptor desc = registeredCaches.get(cfg.getName());
22052198

22062199
QuerySchemaPatch schemaPatch = desc.makeSchemaPatch(cacheInfo.cacheData());
@@ -2336,30 +2329,6 @@ private void registerNewCacheTemplates(CacheJoinNodeDiscoveryData joinData, UUID
23362329
}
23372330
}
23382331

2339-
/**
2340-
* @return {@code true} if grid supports merge of config and {@code False} otherwise.
2341-
*/
2342-
public boolean isMergeConfigSupports(ClusterNode joiningNode) {
2343-
DiscoCache discoCache = ctx.discovery().discoCache();
2344-
2345-
if (discoCache == null)
2346-
return true;
2347-
2348-
if (joiningNode != null && joiningNode.version().compareToIgnoreTimestamp(V_MERGE_CONFIG_SINCE) < 0)
2349-
return false;
2350-
2351-
Collection<ClusterNode> nodes = discoCache.allNodes();
2352-
2353-
for (ClusterNode node : nodes) {
2354-
IgniteProductVersion ver = node.version();
2355-
2356-
if (ver.compareToIgnoreTimestamp(V_MERGE_CONFIG_SINCE) < 0)
2357-
return false;
2358-
}
2359-
2360-
return true;
2361-
}
2362-
23632332
/**
23642333
* @param grpName Group name.
23652334
* @return Group descriptor if group found.

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3136,9 +3136,6 @@ private GridCacheSharedContext createSharedContext(
31363136
@Override public @Nullable IgniteNodeValidationResult validateNode(
31373137
ClusterNode node, JoiningNodeDiscoveryData discoData
31383138
) {
3139-
if (!cachesInfo.isMergeConfigSupports(node))
3140-
return null;
3141-
31423139
String validationRes = cachesInfo.validateJoiningNodeData(discoData, node.isClient());
31433140

31443141
if (validationRes != null)

0 commit comments

Comments
 (0)