pivotal-eshu commented on a change in pull request #6625:
URL: https://github.com/apache/geode/pull/6625#discussion_r658311679
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/cache/TXCommitMessage.java
##########
@@ -391,9 +416,34 @@ void send(TXLockId lockId) {
setRecipientsSendData(Collections.singleton(indivRecip.next()), processor, rcl);
}
} else {
- // Run in normal mode sending to multiple recipients in
- // one shot
- setRecipientsSendData(recipients, processor, rcl);
+ Set<InternalDistributedMember> tempNotificationOnlyMembers =
+ new HashSet<InternalDistributedMember>();
+ Set<InternalDistributedMember> tempTransactionMembers =
+ new HashSet<InternalDistributedMember>();
+ if (!rcl.isEmpty() && !getNotificationOnlyMembers().isEmpty()) {
+ for (RegionCommit rc : rcl) {
+ Set<InternalDistributedMember> getNOM =
getNotificationOnlyMembers().get(rc);
+ Set<InternalDistributedMember> getTM =
getTransactionMembers().get(rc);
+ if (getNOM != null && !getNOM.isEmpty()) {
+ tempNotificationOnlyMembers.addAll(getNOM);
+ }
+ if (getTM != null && !getTM.isEmpty()) {
+ tempTransactionMembers.addAll(getTM);
+ }
+ }
+ tempNotificationOnlyMembers.removeAll(tempTransactionMembers);
+ }
+
+ if (tempNotificationOnlyMembers.isEmpty()) {
+ // Run in normal mode sending to multiple recipients in one
shot
+ setRecipientsSendData(recipients, processor, rcl);
+ } else {
+ recipients.removeAll(tempNotificationOnlyMembers);
Review comment:
I think the issue is that the fix was based on the region commits list
(for different receivers).
I think you may want to consider to use the information available in tx -
for each entry event inside the tx.
FilterRoutingInfo filterRoutingInfo is sent to remote receivers through
FarSideEntryOp. It can be queried for the adjunct servers. It is calculated on
the primary (tx host node).
At remote receiver site, txCallbackEventFactory.createCallbackEvent is
invoked to created the callback event to be used for wan etc. You can use the
following information to determine whether to set the tailKey for this event.
txEntryState == null indicates this is a farsider receiver (not host)
internalRegion.isUsedForPartitionedRegionBucket() to determine if a bucket
region.
use the filterRoutingInfo.getMembers to determine the receive is one of the
adjunctServers -- to determine if tailKey should be reset.
And use internalRegion.getCacheDistributionAdvisor().adviseTX() to confirm
if the receiver needs to do the cache op (hosts the bucket or not).
--
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]