[
https://issues.apache.org/jira/browse/GEODE-7940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17079098#comment-17079098
]
Juan Ramos commented on GEODE-7940:
-----------------------------------
The root issue here is that we are tracking *_only one shadow bucket_* per
{{BucketAdvisor}}, even if there's more than one shadow bucket (more than one
parallel {{gateway-sender}}) attached to the same region.
Assuming that we have 2 parallel {{gateway-senders}}, named _*site2*_ and
_*site3*_, attached to the same region, the logs below show what happens when
we destroy _*sender3*_ (the original PR has only one bucket to make
troubleshooting easier):
{noformat}
[vm3] [info 2020/04/09 10:03:10.449 IST <RMI TCP Connection(2)-127.0.0.1>
tid=0x13] [JUAN]: Destroying /site3_PARALLEL_GATEWAY_SENDER_QUEUE...
[vm3] [info 2020/04/09 10:03:10.450 IST <RMI TCP Connection(2)-127.0.0.1>
tid=0x13] Partitioned Region /site3_PARALLEL_GATEWAY_SENDER_QUEUE with prId=3
is being destroyed.
[vm3] [warn 2020/04/09 10:03:10.451 IST <RMI TCP Connection(2)-127.0.0.1>
tid=0x13] Redundancy has dropped below 1 configured copies to 0 actual copies
for /site3_PARALLEL_GATEWAY_SENDER_QUEUE
[vm3] [warn 2020/04/09 10:03:10.451 IST <RMI TCP Connection(2)-127.0.0.1>
tid=0x13] All in memory copies of some data have been lost for
/site3_PARALLEL_GATEWAY_SENDER_QUEUE
[vm3] [info 2020/04/09 10:03:10.453 IST <RMI TCP Connection(2)-127.0.0.1>
tid=0x13] [JUAN]: Marking bucket
/__PR/_B__site3__PARALLEL__GATEWAY__SENDER__QUEUE_0 as destroyed through
advisor for bucket
/__PR/_B__destroyParallelGatewaySenderShouldNotStopCorruptOtherSendersAttachedToTheRegion_0...
[vm3] [info 2020/04/09 10:03:10.454 IST <RMI TCP Connection(2)-127.0.0.1>
tid=0x13] [JUAN]: Marking bucket
/__PR/_B__site3__PARALLEL__GATEWAY__SENDER__QUEUE_0 as destroyed through
advisor for bucket
/__PR/_B__destroyParallelGatewaySenderShouldNotStopCorruptOtherSendersAttachedToTheRegion_0...
Done!.
[vm3] [info 2020/04/09 10:03:10.457 IST <RMI TCP Connection(2)-127.0.0.1>
tid=0x13] Configured redundancy of 1 copies has been restored to
/site3_PARALLEL_GATEWAY_SENDER_QUEUE
[vm3] [info 2020/04/09 10:03:10.458 IST <RMI TCP Connection(2)-127.0.0.1>
tid=0x13] Partitioned Region /site3_PARALLEL_GATEWAY_SENDER_QUEUE with prId=3
is destroyed.
[vm3] [info 2020/04/09 10:03:10.459 IST <RMI TCP Connection(2)-127.0.0.1>
tid=0x13] [JUAN]: Destroying /site3_PARALLEL_GATEWAY_SENDER_QUEUE... Done!.
{noformat}
When other entries are inserted into the region afterwards, we can see that the
{{gateway-sender}} for _*site2*_ refuses to add the event into the queue
(silently, not even a warning) because the "it thinks" that the shadow bucket
has [been
destroyed|https://github.com/apache/geode/blob/develop/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java#L793-L813]
({{BucketAdvisor}} only keeps track of one shadow bucket per root bucket).
{noformat}
[vm3] [info 2020/04/09 10:03:10.462 IST <RMI TCP Connection(2)-127.0.0.1>
tid=0x13] [JUAN]: Putting Event with key Key1 into queue.
[vm3] [info 2020/04/09 10:03:10.462 IST <RMI TCP Connection(2)-127.0.0.1>
tid=0x13] [JUAN]: Bucket 0 destroyed for key Key1 and shadowKey 2.
[vm3] [info 2020/04/09 10:03:10.462 IST <RMI TCP Connection(2)-127.0.0.1>
tid=0x13] brq.isDestroyed(): false
[vm3] [info 2020/04/09 10:03:10.463 IST <RMI TCP Connection(2)-127.0.0.1>
tid=0x13] prQ: /site2_PARALLEL_GATEWAY_SENDER_QUEUE
[vm3] [info 2020/04/09 10:03:10.463 IST <RMI TCP Connection(2)-127.0.0.1>
tid=0x13]
prQ.getCoLocatedWithRegion().getRegionAdvisor().getBucketAdvisor(bucketId).getBucket().getFullPath():
/__PR/_B__destroyParallelGatewaySenderShouldNotStopCorruptOtherSendersAttachedToTheRegion_0
[vm3] [info 2020/04/09 10:03:10.463 IST <RMI TCP Connection(2)-127.0.0.1>
tid=0x13]
prQ.getCoLocatedWithRegion().getRegionAdvisor().getBucketAdvisor(bucketId).getShadowBucketDestroyed():
true
[vm3] [info 2020/04/09 10:03:10.463 IST <RMI TCP Connection(2)-127.0.0.1>
tid=0x13] [JUAN]: Putting Event with key Key1 into queue, done?: false
{noformat}
> A parallel GatewaySender stops sending events if another GatewaySender that
> was attached to the same region is destroyed
> ------------------------------------------------------------------------------------------------------------------------
>
> Key: GEODE-7940
> URL: https://issues.apache.org/jira/browse/GEODE-7940
> Project: Geode
> Issue Type: Bug
> Components: wan
> Reporter: Barrett Oglesby
> Assignee: Juan Ramos
> Priority: Major
> Labels: GeodeCommons
> Attachments: create-sender-alter-region-all-gfsh_04-01-2020.tgz
>
>
> The attached test reproduces this issue. It has a readme that describes how
> to run it.
> It starts 3 distributed systems named ln, ny and tk.
> ny and tk each have a gateway receiver and a region defined.
> Use gfsh in ln to:
> 1. Create sender to ny
> 2. Create region with sender to ny
> 3. Start doing puts from a client (verify updates are happening in ny)
> 4. Create sender to tk
> 5. Alter region add sender to tk (verify updates are happening in tk)
> 6. Stop sender to ny
> 7. Alter region remove sender to ny
> 8. Destroy sender to ny
> Updates should stop to ny but not tk, but updates to both stop.
> The ln log contains no exceptions. The stats show events being received and
> queued by the sender to tk. The eventQueueSize is 0, though.
> If step 8 is not done, updates continue flowing to tk.
> If the ln server is restarted, updates start flowing to tk again.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)