[
https://issues.apache.org/jira/browse/GEODE-7971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17094375#comment-17094375
]
ASF GitHub Bot commented on GEODE-7971:
---------------------------------------
albertogpz commented on pull request #4928:
URL: https://github.com/apache/geode/pull/4928#issuecomment-620529529
Thanks for your comments.
Please, see below:
> I ran a test with this scenario:
>
> * 2 colocated partitioned regions called customer and order attached
to a parallel sender
>
> * 1 replicated region called customer_creation_time attached to a
serial sender
>
I assume that both senders are configured to group transactions.
>
> The transaction does:
>
> * put 1 customer into customer region
>
> * put 10 orders into order region
>
> * put customer create time into customer_creation_time region
>
>
> Here are some notes from this test:
>
> GatewaySenderFactoryImpl.configureGatewaySender needs a line like below.
Otherwise, the Geode xml case doesn't pass the boolean to the sender.
>
> ```
> this.attrs.isGroupTransactionEvents =
senderCreation.isGroupTransactionEvents()
> ```
>
Good catch. I have pushed a new commit solving it.
> The scenario above is not supported since the transaction is spanning
multiple senders. I don't think there is a way to determine that during
configuration, but the message that is logged needs additional info:
Actually, the reason why the scenario is not supported is not because the
transaction is spanning multiple senders. The reason here is that some events
go to some senders (the customer and order events go to the parallel sender)
and other events go to other senders (the creation time event goes to the
serial sender).
If each event in the transaction went to the same senders, the scenario
would be supported.
You could have another scenario in which you configured two parallel senders
for customer and order regions, with transactions containing customer and order
instances and the transactions would be grouped in batches because all events
would go to the same senders (two in this case).
>
> ```
> [error 2020/04/27 15:45:57.439 PDT <Pooled Waiting Message Processor 2>
tid=0x57] Not all events in transaction go to the same senders that group
transactions
> ```
>
> At least the sender ids should be logged if not which events go to which
senders.
>
> I see
`TXLastEventInTransactionUtils.checkAllEventsGoToSameGroupingSenders` is
throwing the ServiceConfigurationError. Maybe that ServiceConfigurationError's
message can contain this info. Then you can log the error. Maybe even the
actual stack.
>
The new commit contains an extended logging error including the events and,
for each event, to which senders it would be sent to.
I did not want to add this information initially because I am not sure how
meaningful it would be for the one reading it and also because it would add
processing time.
> Also, I see that the test above succeeds. The batch is sent with the
customer and orders. Other than that warning which the customer could easily
miss, there is no evidence that all the events in the transaction were not sent
in the same batch. Maybe the commit should fail?
>
It would not be possible at this point to make the commit fail as the
processing is done after the commit. If done before, it could slow down
transaction operations.
Besides, I think it is better to make the operation progress to the other
side logging the error which would indicate that there would be a small chance
that the events would not be sent in the same batch. This, in turn, could only
be a problem when there is a network split.
> I'll change my test to remove the serial sender and continue to look at
this.
----------------------------------------------------------------
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]
> Gateway sender to deliver transaction events atomically to gateway receivers
> ----------------------------------------------------------------------------
>
> Key: GEODE-7971
> URL: https://issues.apache.org/jira/browse/GEODE-7971
> Project: Geode
> Issue Type: Improvement
> Components: wan
> Reporter: Alberto Gomez
> Assignee: Alberto Gomez
> Priority: Major
> Fix For: 1.13.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> The goal of this ticket is to implement the necessary changes in the gateway
> sender to prevent that events belonging to the same transaction are spread
> across different batches. In other words, to ensure that events from the same
> transaction are sent inside the same batch.
> This will be an optional feature on gateway senders to be enabled via a new
> parameter (--group-transaction-events) and will be restricted to serial
> gateway senders with just one dispatcher thread or to parallel gateway
> senders.
> Apart from the above restriction, grouping of events for a transaction inside
> the same batch may only be attained if the regions to which the events belong
> are replicated by the same set of gateway senders with the
> --group-transaction-events flag enabled. If this condition is not met, the
> events will be correctly delivered by the gateway senders but it will not be
> guaranteed that all events will always be sent inside the same batch.
> For more details see:
> [https://cwiki.apache.org/confluence/display/GEODE/Gw+sender+to+deliver+transaction+events+atomically+to+receivers]
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)