upthewaterspout commented on a change in pull request #6808:
URL: https://github.com/apache/geode/pull/6808#discussion_r698624910
##########
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:
This seems to be the only call to the new canDelete function? If so, the
third boolean parameter doesn't need to be there. Also it can just return a
boolean, since that is all you are using in the result. No need for a new
RefusalReason.
--
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]