albertogpz opened a new pull request #6473:
URL: https://github.com/apache/geode/pull/6473


   …ent when stopping gateway sender.
   
   When stopping a gateway sender having group-transaction-events
   set, there is a grace period in which events
   received that belong to transactions are not dropped
   if there are events in the queue belonging
   to that transaction. This is done to make
   sure that the queue does not contain incomplete
   transactions.
   
   Given that when the parallel gateway sender
   creates a batch with events from the queue,
   it removes them from the queue as it adds them
   to the batch, it is possible that a transaction event
   received by a gateway sender during
   the stopping grace period
   does not find events belonging to that transaction
   in the queue because they have been added to
   a current batch and therefore that event will
   be dropped, causing that an incomplete transaction
   will be finally stored in the queue/batch.
   In order to solve the issue, when receiving a
   transaction event during the stopping grace period,
   the gateway sender must look for events belonging
   to that transaction, not only in the queue
   but also in the peekedEvents from the queue
   (those events retrieved from the queue and
   put in batches).
   
   Also, in order to avoid flakyness of the distributed
   test cases that test that batches with incomplete
   transactions are not sent when stopping the
   gateway sender, the number of retries
   to get the events from the queue/batches
   has been set to high number in the tests by means of
   a new setter in GatewaySender which has
   also been published as a gfsh and
   cache.xml parameter (get-transaction-events-from-queue-retries).
   
   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 [email protected].
   


-- 
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:
[email protected]


Reply via email to