mhansonp commented on a change in pull request #6845:
URL: https://github.com/apache/geode/pull/6845#discussion_r705689872
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/rebalance/model/Member.java
##########
@@ -40,21 +43,73 @@
private final boolean isCritical;
private final boolean enforceLocalMaxMemory;
- Member(AddressComparor addressComparor, InternalDistributedMember memberId,
boolean isCritical,
+ @VisibleForTesting
+ public Member(AddressComparor addressComparor, InternalDistributedMember
memberId,
+ boolean isCritical,
boolean enforceLocalMaxMemory) {
this.addressComparor = addressComparor;
this.memberId = memberId;
this.isCritical = isCritical;
this.enforceLocalMaxMemory = enforceLocalMaxMemory;
}
- Member(AddressComparor addressComparor, InternalDistributedMember memberId,
float weight,
+ @VisibleForTesting
+ public Member(AddressComparor addressComparor, InternalDistributedMember
memberId, float weight,
long localMaxMemory, boolean isCritical, boolean enforceLocalMaxMemory) {
this(addressComparor, memberId, isCritical, enforceLocalMaxMemory);
this.weight = weight;
this.localMaxMemory = localMaxMemory;
}
+ /**
+ * Check to see if the member is the last copy of the bucket in the
redundancy zone
+ *
+ * @param bucket -- bucket to be deleted from the member
+ * @param distributionManager -- used to check members of redundancy zones
+ */
+
+ public RefusalReason canDelete(Bucket bucket, DistributionManager
distributionManager) {
+ // This code only applies to Clusters.
+ if (!(distributionManager instanceof ClusterDistributionManager)) {
+ return RefusalReason.NONE;
+ }
+
+ ClusterDistributionManager clstrDistrMgr = (ClusterDistributionManager)
distributionManager;
Review comment:
Well, I needed that on 1.12 so I will see about cleaning that up.
--
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]