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



##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
##########
@@ -1981,6 +1982,36 @@ public void run() {
       return recipients;
     }
 
+
+    private Set<InternalDistributedMember> 
getAllRecipientsForEvent(InternalCache cache,
+        String partitionedRegionName, int bucketId) {
+      Set<InternalDistributedMember> recipients = new ObjectOpenHashSet<>();
+      PartitionedRegion partitionedRegion =
+          (PartitionedRegion) cache.getRegion(partitionedRegionName);
+      if (partitionedRegion != null && partitionedRegion.getRegionAdvisor() != 
null) {
+        final String bucketFullPath =
+            SEPARATOR + PartitionedRegionHelper.PR_ROOT_REGION_NAME + SEPARATOR
+                + partitionedRegion.getBucketName(bucketId);
+        AbstractBucketRegionQueue brq =

Review comment:
       updated

##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
##########
@@ -1201,13 +1201,14 @@ protected void addRemovedEvent(PartitionedRegion prQ, 
int bucketId, Object key)
 
   public void sendQueueRemovalMesssageForDroppedEvent(PartitionedRegion prQ, 
int bucketId,
       Object key) {
-    final HashMap<String, Map<Integer, List>> temp = new HashMap<String, 
Map<Integer, List>>();
-    Map bucketIdToDispatchedKeys = new ConcurrentHashMap();
-    temp.put(prQ.getFullPath(), bucketIdToDispatchedKeys);
-    addRemovedEventToMap(bucketIdToDispatchedKeys, bucketId, key);
     Set<InternalDistributedMember> recipients =
-        removalThread.getAllRecipients(sender.getCache(), temp);
+        removalThread.getAllRecipientsForEvent(sender.getCache(), 
prQ.getFullPath(), bucketId);
+
     if (!recipients.isEmpty()) {
+      final HashMap<String, Map<Integer, List>> temp = new HashMap<String, 
Map<Integer, List>>();
+      Map bucketIdToDispatchedKeys = new ConcurrentHashMap();

Review comment:
       updated




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


Reply via email to