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/09/01 16:50:16 UTC

[GitHub] [geode] mhansonp commented on a change in pull request #6808: GEODE-9554: Rebalancing a region with multiple redundancy zones can fail

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



##########
File path: geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/rebalance/model/PartitionedRegionLoadModel.java
##########
@@ -470,12 +470,14 @@ public Move findBestRemove(Bucket bucket) {
     Move bestMove = null;
 
     for (Member member : bucket.getMembersHosting()) {
-      float newLoad = (member.getTotalLoad() - bucket.getLoad()) / member.getWeight();
-      if (newLoad > mostLoaded && !member.equals(bucket.getPrimary())) {
-        Move move = new Move(null, member, bucket);
-        if (!this.attemptedBucketRemoves.contains(move)) {
-          mostLoaded = newLoad;
-          bestMove = move;
+      if (member.canDelete(bucket, this.partitionedRegion.getMyId(), true).willAccept()) {

Review comment:
       I have cleaned that up. Since I rewrote the core of the function.




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