dschneider-pivotal commented on a change in pull request #6873:
URL: https://github.com/apache/geode/pull/6873#discussion_r710572979



##########
File path: 
geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/RegionProvider.java
##########
@@ -300,14 +299,18 @@ public RedisKeyCommands getKeyCommands() {
     return keyCommands;
   }
 
+  @SuppressWarnings("unchecked")
   public Set<DistributedMember> getRegionMembers() {
-    PartitionRegionInfo info = 
PartitionRegionHelper.getPartitionRegionInfo(dataRegion);
-    Set<DistributedMember> membersWithDataRegion = new HashSet<>();
-    for (PartitionMemberInfo memberInfo : info.getPartitionMemberInfo()) {
-      membersWithDataRegion.add(memberInfo.getDistributedMember());
+    InternalDistributedMember myId =
+        partitionedRegion.getDistributionManager().getDistributionManagerId();
+    Set<InternalDistributedMember> otherIds =
+        partitionedRegion.getRegionAdvisor().adviseDataStore();
+    if (otherIds.isEmpty()) {
+      return singleton(myId);
+    } else {
+      otherIds.add(myId);
+      return (Set<DistributedMember>) (Set<?>) otherIds;

Review comment:
       I reworked this so that this method only returns remote members and the 
caller of it executes the publish directly for the local member and only using 
the FunctionService for remote members.




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