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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]