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

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

boglesby opened a new pull request #5378:
URL: https://github.com/apache/geode/pull/5378


   …eader region's to the sender
   
   Thank you for submitting a contribution to Apache Geode.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in 
the commit message?
   
   - [ ] Has your PR been rebased against the latest commit within the target 
branch (typically `develop`)?
   
   - [ ] Is your initial contribution a single, squashed commit?
   
   - [ ] Does `gradlew build` run cleanly?
   
   - [ ] Have you written or updated unit tests to verify your changes?
   
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   
   ### Note:
   Please ensure that once the PR is submitted, check Concourse for build 
issues and
   submit an update to your PR as soon as possible. If you need help, please 
send an
   email to d...@geode.apache.org.
   


----------------------------------------------------------------
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
>
> 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