5454import org .apache .ignite .internal .IgniteInternalFuture ;
5555import org .apache .ignite .internal .IgniteNodeAttributes ;
5656import org .apache .ignite .internal .cluster .ClusterTopologyCheckedException ;
57- import org .apache .ignite .internal .managers .discovery .DiscoCache ;
5857import org .apache .ignite .internal .managers .encryption .GridEncryptionManager ;
5958import org .apache .ignite .internal .managers .encryption .GroupKey ;
6059import org .apache .ignite .internal .managers .encryption .GroupKeyEncrypted ;
7877import org .apache .ignite .internal .util .typedef .internal .CU ;
7978import org .apache .ignite .internal .util .typedef .internal .U ;
8079import org .apache .ignite .lang .IgniteInClosure ;
81- import org .apache .ignite .lang .IgniteProductVersion ;
8280import org .apache .ignite .lang .IgniteUuid ;
8381import org .apache .ignite .plugin .CachePluginContext ;
8482import 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.
0 commit comments