Source:
private void registerReceivedCaches(CacheNodeCommonDiscoveryData cachesData) { Map<DynamicCacheDescriptor, QuerySchemaPatch> patchesToApply = new HashMap<>(); Collection<DynamicCacheDescriptor> cachesToSave = new HashSet<>(); boolean hasSchemaPatchConflict = false; for (CacheData cacheData : cachesData.caches().values()) { CacheGroupDescriptor grpDesc = registeredCacheGrps.get(cacheData.groupId()); assert grpDesc != null : cacheData.cacheConfiguration().getName(); CacheConfiguration<?, ?> cfg = cacheData.cacheConfiguration(); DynamicCacheDescriptor desc = new DynamicCacheDescriptor( ctx, cacheData.cacheConfiguration(), cacheData.cacheType(), grpDesc, false, cacheData.receivedFrom(), cacheData.staticallyConfigured(), cacheData.sql(), cacheData.deploymentId(), new QuerySchema(cacheData.schema().entities()), cacheData.cacheConfigurationEnrichment() ); Collection<QueryEntity> localQueryEntities = getLocalQueryEntities(cfg.getName()); QuerySchemaPatch schemaPatch = desc.makeSchemaPatch(localQueryEntities); if (schemaPatch.hasConflicts()) { hasSchemaPatchConflict = true; log.warning("Skipping apply patch because conflicts : " + schemaPatch.getConflictsMessage()); } else if (!schemaPatch.isEmpty()) patchesToApply.put(desc, schemaPatch); else if (!GridFunc.eqNotOrdered(desc.schema().entities(), localQueryEntities)) cachesToSave.add(desc); desc.receivedOnDiscovery(true); String cacheName = cacheData.cacheConfiguration().getName(); registeredCaches.put(cacheName, desc); addToList(cachesMonList, () -> new CacheView(desc)); ctx.discovery().setCacheFilter( desc.cacheId(), grpDesc.groupId(), cfg.getName(), cfg.getNearConfiguration() != null); } updateRegisteredCachesIfNeeded(patchesToApply, cachesToSave, hasSchemaPatchConflict); }

Target:
private void registerReceivedCaches(CacheNodeCommonDiscoveryData cachesData) { Map<DynamicCacheDescriptor, QuerySchemaPatch> patchesToApply = new HashMap<>(); Collection<DynamicCacheDescriptor> cachesToSave = new HashSet<>(); boolean hasSchemaPatchConflict = false; for (CacheData cacheData : cachesData.caches().values()) { CacheGroupDescriptor grpDesc = registeredCacheGrps.get(cacheData.groupId()); assert grpDesc != null : cacheData.cacheConfiguration().getName(); CacheConfiguration<?, ?> cfg = cacheData.cacheConfiguration(); DynamicCacheDescriptor desc = new DynamicCacheDescriptor( ctx, cacheData.cacheConfiguration(), cacheData.cacheType(), grpDesc, false, cacheData.receivedFrom(), cacheData.staticallyConfigured(), cacheData.sql(), cacheData.deploymentId(), new QuerySchema(cacheData.schema().entities()), cacheData.cacheConfigurationEnrichment() ); Collection<QueryEntity> localQueryEntities = getLocalQueryEntities(cfg.getName()); QuerySchemaPatch schemaPatch = desc.makeSchemaPatch(localQueryEntities); if (schemaPatch.hasConflicts()) { hasSchemaPatchConflict = true; log.warning("Skipping apply patch because conflicts : " + schemaPatch.getConflictsMessage()); } else if (!schemaPatch.isEmpty()) patchesToApply.put(desc, schemaPatch); else if (!GridFunc.eqNotOrdered(desc.schema().entities(), localQueryEntities)) cachesToSave.add(desc); desc.receivedOnDiscovery(true); registeredCaches.put(cacheData.cacheConfiguration().getName(), desc); ctx.discovery().setCacheFilter( desc.cacheId(), grpDesc.groupId(), cfg.getName(), cfg.getNearConfiguration() != null); } updateRegisteredCachesIfNeeded(patchesToApply, cachesToSave, hasSchemaPatchConflict); }