mivanac commented on a change in pull request #6625:
URL: https://github.com/apache/geode/pull/6625#discussion_r658196719



##########
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 have found what was the problem, and pushed fix, but should we also 
consider other alternative, mentioned above.




-- 
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