You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/12/08 23:20:21 UTC

[GitHub] [geode] nabarunnag commented on a change in pull request #7124: GEODE-9815: Prefer to remove a redundant copy in the same zone

nabarunnag commented on a change in pull request #7124:
URL: https://github.com/apache/geode/pull/7124#discussion_r765318342



##########
File path: geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/rebalance/model/PartitionedRegionLoadModel.java
##########
@@ -468,6 +482,35 @@ public Move findBestTarget(Bucket bucket, boolean checkIPAddress) {
     return bestMove;
   }
 
+  String getRedundancyZone(InternalDistributedMember memberID) {
+    assert (partitionedRegion != null);
+    return partitionedRegion.getDistributionManager().getRedundancyZone(memberID);
+  }
+
+  /**
+   *
+   * Look for a zone that has more than one member represented.
+   * That is where we want to try to delete first.
+   *
+   * @param members set of members that are hosting this bucket
+   * @return null or a string containing the zone to delete a member from
+   */
+  String getPreferredDeletionZone(Set<Member> members) {
+
+    Map<String, Integer> distributionMap = new HashMap<>();

Review comment:
       Can this be simplified using a set? Its more than one, it returns immediately 




-- 
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: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org