[ 
https://issues.apache.org/jira/browse/GEODE-8366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17163724#comment-17163724
 ] 

ASF GitHub Bot commented on GEODE-8366:
---------------------------------------

boglesby merged pull request #5378:
URL: https://github.com/apache/geode/pull/5378


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> A non-persistent partitioned region attached to a non-persistent gateway 
> sender throws an exception if its leader co-located region is persistent
> -------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GEODE-8366
>                 URL: https://issues.apache.org/jira/browse/GEODE-8366
>             Project: Geode
>          Issue Type: Bug
>          Components: wan
>            Reporter: Barrett Oglesby
>            Assignee: Barrett Oglesby
>            Priority: Major
>              Labels: pull-request-available
>
> With this configuration:
> {noformat}
> <gateway-sender id="non_persistent_sender" parallel="true" 
> enable-persistence="false" remote-distributed-system-id="1"/>
> <region name="persistent_parent" refid="PARTITION_REDUNDANT_PERSISTENT"/>
> <region name="non_persistent_child" refid="PARTITION_REDUNDANT">
>   <region-attributes gateway-sender-ids="non_persistent_sender">
>     <partition-attributes colocated-with="persistent_parent" 
> redundant-copies="1"/>
>   </region-attributes>
> </region>
> {noformat}
> An exception is thrown, and the Cache fails to start.
> The error and exception are:
> {noformat}
> [error 2020/07/16 14:06:59.908 PDT <main> tid=0x1] 
> org.apache.geode.internal.cache.wan.GatewaySenderException: Non persistent 
> gateway sender non_persistent_sender can not be attached to persistent region 
> /persistent_parent
> {noformat}
> {noformat}
> Exception in thread "main" 
> org.apache.geode.internal.cache.wan.GatewaySenderException: Non persistent 
> gateway sender non_persistent_sender can not be attached to persistent region 
> /persistent_parent
>       at 
> org.apache.geode.internal.cache.wan.parallel.ParallelGatewaySenderQueue.addShadowPartitionedRegionForUserPR(ParallelGatewaySenderQueue.java:470)
>       at 
> org.apache.geode.internal.cache.wan.parallel.ParallelGatewaySenderQueue.addShadowPartitionedRegionForUserPR(ParallelGatewaySenderQueue.java:459)
>       at 
> org.apache.geode.internal.cache.wan.parallel.ParallelGatewaySenderEventProcessor.addShadowPartitionedRegionForUserPR(ParallelGatewaySenderEventProcessor.java:195)
>       at 
> org.apache.geode.internal.cache.wan.parallel.ConcurrentParallelGatewaySenderQueue.addShadowPartitionedRegionForUserPR(ConcurrentParallelGatewaySenderQueue.java:183)
>       at 
> org.apache.geode.internal.cache.PartitionedRegion.postCreateRegion(PartitionedRegion.java:1201)
>       at 
> org.apache.geode.internal.cache.GemFireCacheImpl.createVMRegion(GemFireCacheImpl.java:3115)
>       at 
> org.apache.geode.internal.cache.GemFireCacheImpl.basicCreateRegion(GemFireCacheImpl.java:2975)
> {noformat}
> The ParallelGatewaySenderQueue.addShadowPartitionedRegionForUserPR method 
> currently compares the data policy of the input region's leader region with 
> the sender's persistence policy. It assumes the input region and the leader 
> region have the same data policy. In this scenario, that is not the case. The 
> input region is 'non_persistent_child' which is not persistent, and the 
> leader region is 'persistent_parent' which is persistent. The sender is 
> 'non_persistent_sender' which is not persistent. So, instead of comparing the 
> data policy of 'non_persistent_child' to the sender which would succeed since 
> they are both not persistent, it compares the data policy of 
> 'persistent_parent' to the sender which fails since one is persistent, and 
> the other is not.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to