aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_volume_balance.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/shell/command_volume_balance.go')
-rw-r--r--weed/shell/command_volume_balance.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/shell/command_volume_balance.go b/weed/shell/command_volume_balance.go
index 53222ca29..928dec02a 100644
--- a/weed/shell/command_volume_balance.go
+++ b/weed/shell/command_volume_balance.go
@@ -306,16 +306,16 @@ func isGoodMove(placement *super_block.ReplicaPlacement, existingReplicas []*Vol
dcs[targetNode.dc] = true
racks[fmt.Sprintf("%s %s", targetNode.dc, targetNode.rack)]++
- if len(dcs) > placement.DiffDataCenterCount+1 {
+ if len(dcs) != placement.DiffDataCenterCount+1 {
return false
}
- if len(racks) > placement.DiffRackCount+placement.DiffDataCenterCount+1 {
+ if len(racks) != placement.DiffRackCount+placement.DiffDataCenterCount+1 {
return false
}
for _, sameRackCount := range racks {
- if sameRackCount > placement.SameRackCount+1 {
+ if sameRackCount != placement.SameRackCount+1 {
return false
}
}