jvarenina commented on a change in pull request #6625:
URL: https://github.com/apache/geode/pull/6625#discussion_r658801191
##########
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:
Hi @pivotal-eshu ,
Thank you for the help on this issue. We really appreciate it.
I have create the draft PR with the solution that it based on what you
proposed in above comment: https://github.com/apache/geode/pull/6646
Could you please check it and comment?
Just to share with you why I haven't used some of the proposed checks in the
solution:
`internalRegion.getCacheDistributionAdvisor().adviseTX() `-> I haven't used
this one because adviseTX only works with BucketRegion. Since bucket region is
not available on adjunct server it not possible to get primary and redundant
servers with this function there.
`txEntryState == null` -> Not sure that this is needed because impacted part
of code is executed only on farside.
`internalRegion.isUsedForPartitionedRegionBucket() `-> I haven't used this
check because it returns "false" on adjunct member. I think that this is
already checked with `this.internalRegion instanceof PartitionedRegion` few
lines before the impact. When server hosts bucket regions then `internalRegion`
will be of type `BucketRegion`.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]