[
https://issues.apache.org/jira/browse/GEODE-3174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16807043#comment-16807043
]
Anilkumar Gingade commented on GEODE-3174:
------------------------------------------
The support for both cluster-configuration and node-level cache.xml was kept as
gfsh did not supported all the cache configuration properties/commands. With
changes to gfsh, one should able to configure cache without cache.xml.
Support for both cluster configuration and cache.xml needs to be removed.
> Use of multiple cache configuration (xml) can alter/impact cache setting
> during restart.
> ----------------------------------------------------------------------------------------
>
> Key: GEODE-3174
> URL: https://issues.apache.org/jira/browse/GEODE-3174
> Project: Geode
> Issue Type: Bug
> Components: configuration
> Affects Versions: 1.0.0-incubating, 1.1.0, 1.1.1, 1.2.0
> Reporter: Anilkumar Gingade
> Priority: Major
>
> When system is configured using multiple cache configuration xml, the cache
> setting could differ during restart.
> When a geode node is configured using, cluster configuration and its own
> cache.xml; during re-start the cache.xml settings are applied only after
> cluster-configuration xml is parsed which leads to cache getting
> created/initialized using partial configuration details.
> One of the problem encountered is with pdx persistent setting. The pdx
> persistent setting was done using node's cache.xml. And persistent regions
> are created using cluster configuration. When the node was re-started, the
> system parses the cluster-configuration file, and while creating the
> persistent region throws exception saying pdx is not persisted, as the pdx
> persistent setting is defined in cache.xml; which is processed later.
> While code walk through, noticed one more issue with pdx-type registry, which
> could get created as non-persistent region when the node is re-started.
> One solution would be to merge all the xml (cluster-configuration,
> server-group and cache.xml) before cache creation is invoked.
> Steps to reproduce:
> Start locator.
> Start server1 with its own cache.xml with pdx-persistance set (make sure
> use-cluster configuration is set to true)
> Start server2 with its own cache.xml with pdx-persistance set (make sure
> use-cluster configuration is set to true)
> create non-persistent-partition region. Add pdx entries to it.
> create persistent-partition region.
> stop server2
> re-start server2
> it fails with:
> Exception in thread "main" org.apache.geode.pdx.PdxInitializationException:
> The PDX metadata must be persistent in a member that has persistent data. See
> CacheFactory.setPdxPersistent.
> at
> org.apache.geode.pdx.internal.PeerTypeRegistration.checkAllowed(PeerTypeRegistration.java:535)
> at
> org.apache.geode.pdx.internal.PeerTypeRegistration.creatingPersistentRegion(PeerTypeRegistration.java:483)
> at
> org.apache.geode.pdx.internal.TypeRegistry.creatingPersistentRegion(TypeRegistry.java:276)
> at
> org.apache.geode.internal.cache.LocalRegion.findDiskStore(LocalRegion.java:7800)
> at
> org.apache.geode.internal.cache.PartitionedRegion.findDiskStore(PartitionedRegion.java:9378)
> at
> org.apache.geode.internal.cache.LocalRegion.<init>(LocalRegion.java:600)
> at
> org.apache.geode.internal.cache.PartitionedRegion.<init>(PartitionedRegion.java:614)
> at
> org.apache.geode.internal.cache.GemFireCacheImpl.createVMRegion(GemFireCacheImpl.java:3260)
> at
> org.apache.geode.internal.cache.GemFireCacheImpl.basicCreateRegion(GemFireCacheImpl.java:3199)
> at
> org.apache.geode.internal.cache.xmlcache.RegionCreation.createRoot(RegionCreation.java:255)
> at
> org.apache.geode.internal.cache.xmlcache.CacheCreation.initializeRegions(CacheCreation.java:544)
> at
> org.apache.geode.internal.cache.xmlcache.CacheCreation.create(CacheCreation.java:495)
> at
> org.apache.geode.internal.cache.xmlcache.CacheXmlParser.create(CacheXmlParser.java:343)
> at
> org.apache.geode.internal.cache.GemFireCacheImpl.loadCacheXml(GemFireCacheImpl.java:4483)
> at
> org.apache.geode.internal.cache.ClusterConfigurationLoader.applyClusterXmlConfiguration(ClusterConfigurationLoader.java:129)
> at
> org.apache.geode.internal.cache.GemFireCacheImpl.initialize(GemFireCacheImpl.java:1245)
> at
> org.apache.geode.internal.cache.GemFireCacheImpl.basicCreate(GemFireCacheImpl.java:796)
> at
> org.apache.geode.internal.cache.GemFireCacheImpl.create(GemFireCacheImpl.java:783)
> at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:179)
> at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:219)
> at
> org.apache.geode.distributed.internal.DefaultServerLauncherCacheProvider.createCache(DefaultServerLauncherCacheProvider.java:52)
> at
> org.apache.geode.distributed.ServerLauncher.createCache(ServerLauncher.java:857)
> at
> org.apache.geode.distributed.ServerLauncher.start(ServerLauncher.java:769)
> at
> org.apache.geode.distributed.ServerLauncher.run(ServerLauncher.java:696)
> at
> org.apache.geode.distributed.ServerLauncher.main(ServerLauncher.java:228)
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)