mivanac commented on a change in pull request #7323:
URL: https://github.com/apache/geode/pull/7323#discussion_r839959923
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/cache/AbstractBucketRegionQueue.java
##########
@@ -257,11 +273,47 @@ protected void loadEventsFromTempQueue() {
}
getInitializationLock().writeLock().unlock();
}
+ if (regionToDispatchedKeysMap.size() > 0
+ && getPartitionedRegion().getRegionAdvisor() != null) {
+ Set<InternalDistributedMember> recipients =
+ getPartitionedRegion().getRegionAdvisor().adviseDataStore();
+
+ if (recipients.isEmpty()) {
+ return;
+ }
+
+ InternalDistributedSystem ids =
getCache().getInternalDistributedSystem();
+ DistributionManager dm = ids.getDistributionManager();
+ dm.retainMembersWithSameOrNewerVersion(recipients,
KnownVersion.GEODE_1_15_0);
+
+ if (!recipients.isEmpty()) {
+ ParallelQueueSetPossibleDuplicateMessage pqspdm =
+ new
ParallelQueueSetPossibleDuplicateMessage(LOAD_FROM_TEMP_QUEUE,
+ regionToDispatchedKeysMap);
+ pqspdm.setRecipients(recipients);
+ dm.putOutgoing(pqspdm);
+ }
+ }
}
}
+ }
+ }
+
+ private void addDuplicateEvent(Map<String, Map<Integer, List<Object>>>
regionToDispatchedKeysMap,
+ GatewaySenderEventImpl event) {
+ Map<Integer, List<Object>> bucketIdToDispatchedKeys =
+ regionToDispatchedKeysMap.get(getPartitionedRegion().getFullPath());
+ if (bucketIdToDispatchedKeys == null) {
+ bucketIdToDispatchedKeys = new ConcurrentHashMap<>();
+ regionToDispatchedKeysMap.put(getPartitionedRegion().getFullPath(),
bucketIdToDispatchedKeys);
+ }
- // }
+ List<Object> dispatchedKeys = bucketIdToDispatchedKeys.get(getId());
+ if (dispatchedKeys == null) {
+ dispatchedKeys = new ArrayList<>();
+ bucketIdToDispatchedKeys.put(getId(), dispatchedKeys);
}
Review comment:
Thanks for 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]