[ https://issues.apache.org/jira/browse/GEODE-2841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15991802#comment-15991802 ]
Darrel Schneider commented on GEODE-2841: ----------------------------------------- This is an xml parser issue. If you changed your xml to this it will work: {code} <?xml version="1.0" encoding="UTF-8"?> <cache xmlns="http://geode.apache.org/schema/cache" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://geode.apache.org/schema/cache http://geode.apache.org/schema/cache/cache-1.0.xsd" version="1.0"> <region name="regionA"> <region-attributes off-heap="true" data-policy="partition"/> </region> </cache> {code} The xsd allows each region to have 0 or MORE region-attributes elements. From my understanding of the XML parser code the last one wins. (See org.apache.geode.internal.cache.xmlcache.CacheXmlParser.endRegionAttributes()). I do not understand how having multiple region-attribute elements in a region could be useful. I think instead of 0 or MORE it should have just been an optional (0 or 1) element. The cache element can also have region-attributes sub-elements and in that case multiple makes sense. I'm not sure if the cache.xsd should be changed or not some I'm changing the component to management. > unable to create off-heap region from cache.xml > ----------------------------------------------- > > Key: GEODE-2841 > URL: https://issues.apache.org/jira/browse/GEODE-2841 > Project: Geode > Issue Type: Bug > Components: management > Reporter: Swapnil Bawaskar > > I defined a cache.xml as follows: > {noformat} > <?xml version="1.0" encoding="UTF-8"?> > <cache > xmlns="http://geode.apache.org/schema/cache" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://geode.apache.org/schema/cache > http://geode.apache.org/schema/cache/cache-1.0.xsd" > version="1.0"> > <region name="regionA"> > <region-attributes off-heap="true"/> > <region-attributes data-policy="partition"/> > </region> > </cache> > {noformat} > But, this region is not configured for off-heap: > {noformat} > gfsh>describe region --name=/regionA > .......................................................... > Name : regionA > Data Policy : partition > Hosting Members : serv1 > Non-Default Attributes Shared By Hosting Members > Type | Name | Value > ------ | ----------- | --------- > Region | size | 0 > | data-policy | PARTITION > {noformat} > When the region is created from gfsh > {noformat} > gfsh>create region --name=regionB --type=PARTITION --off-heap > {noformat} > The region is configured for off-heap > {noformat} > gfsh>describe region --name=/regionB > .......................................................... > Name : regionB > Data Policy : partition > Hosting Members : serv1 > Non-Default Attributes Shared By Hosting Members > Type | Name | Value > --------- | ---------------- | --------- > Region | data-policy | PARTITION > | size | 0 > | off-heap | true > Partition | local-max-memory | 3276 > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)