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/13 23:47:35 UTC

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

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



##########
File path: geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/rebalance/model/PartitionedRegionLoadModel.java
##########
@@ -435,10 +435,24 @@ private void initLowRedundancyBuckets() {
 
   private void initOverRedundancyBuckets() {
     this.overRedundancyBuckets = new TreeSet<>(REDUNDANCY_COMPARATOR);
+    Set<String> redundancyZones = new HashSet<>();
+
     for (BucketRollup b : this.buckets) {
-      if (b != null && b.getOnlineRedundancy() > this.requiredRedundancy) {
-        this.overRedundancyBuckets.add(b);
+      if (b != null) {
+        if (b.getOnlineRedundancy() > this.requiredRedundancy) {
+          this.overRedundancyBuckets.add(b);
+        } else {
+          for (Member member : b.getMembersHosting()) {
+            String redundancyZone = this.getRedundancyZone(member.getDistributedMember());
+            if (redundancyZones.contains(redundancyZone)) {

Review comment:
       I will look it this. I specifically tested the fixes and tests so, I believe your test results, but I am not sure how I ended up at this point.  Thanks for you always detailed feedback!




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