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

ASF subversion and git services commented on GEODE-9408:
--------------------------------------------------------

Commit b377e3f808562fdf59d2753a5a58fd9b9d603883 in geode's branch 
refs/heads/develop from Alberto Gomez
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=b377e3f ]

GEODE-9408: Avoid duplicate events sent by Serial Gateway Sender when 
group-transaction-events is true (#6663)


GEODE-9408: Avoid duplicate events sent by Serial Gateway Sender

The logic for removing events from the Serial Gateway Sender queue
when an ack for a batch is received from the gateway receiver
is implemented by the remove() method of the SerialGatewaySenderQueue class.
When the group-transaction-events setting is activated, this logic,
needs to act differently if the event was an event peeked to complete
a transaction in a batch than if it is an event peeked with the peekAhead 
method.
In the first case, the head key and lastDispatched member must not be
updated with the key of the event because that could provoke that
events from the queue not yet retrieved are never retrieved.

Nevertheless, the head key and lastDispatched member must be
updated for a key peeked to complete a transaction (extraPeekedId)
when the key with the previous id is removed.
This was not being done in some cases by the remove() method and it
has been corrected in this PR.

Several DUnit test cases have been added to test this fix
in a Geode WAN system with a Serial GatewaySender with
group-transaction-events set to true. In the test cases, it is verified that
no duplicated events are sent by means of checking that incomplete transactions
are not sent.

Increase default number of retries 

> Avoid duplicate events sent by Serial Gateway Sender when 
> group-transaction-events is true
> ------------------------------------------------------------------------------------------
>
>                 Key: GEODE-9408
>                 URL: https://issues.apache.org/jira/browse/GEODE-9408
>             Project: Geode
>          Issue Type: Bug
>          Components: wan
>            Reporter: Alberto Gomez
>            Assignee: Alberto Gomez
>            Priority: Major
>              Labels: pull-request-available
>
> When group-transaction-events is set to true for a serial gateway sender, it 
> is possible that events that were retrieved from the queue to be added to a 
> batch in order to complete a transaction are later sent again in another 
> batch due to a bug in the removal logic of events when the ack for a batch is 
> received from the receiver.
> This situation has been seen when several clients are sending transactions to 
> a Geode cluster when the events for the transactions sent by the clients are 
> mixed in the gateway sender queue.
>  



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

Reply via email to