mhansonp commented on a change in pull request #7124:
URL: https://github.com/apache/geode/pull/7124#discussion_r777728832
##########
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 have rewritten most of the tests as JUnit tests, as well as fixing the
a couple of issues I found in the code. Please review when you get the chance.
--
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]