mivanac commented on a change in pull request #6625:
URL: https://github.com/apache/geode/pull/6625#discussion_r657858433
##########
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:
It seems, that this approach to solve this issue on sending side is
generating more and more patches. Maybe this shoulb be solved on receiving side
as @jvarenina proposed in
https://github.com/apache/geode/pull/6477#issuecomment-848723153
--
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]