aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_ec_common.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/shell/command_ec_common.go')
-rw-r--r--weed/shell/command_ec_common.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/shell/command_ec_common.go b/weed/shell/command_ec_common.go
index 0f8430cab..8bef78394 100644
--- a/weed/shell/command_ec_common.go
+++ b/weed/shell/command_ec_common.go
@@ -932,8 +932,8 @@ func (ecb *ecBalancer) pickEcNodeToBalanceShardsInto(vid needle.VolumeId, existi
}
shards := nodeShards[node]
- if ecb.replicaPlacement != nil && shards > ecb.replicaPlacement.SameRackCount {
- details += fmt.Sprintf(" Skipped %s because shards %d > replica placement limit for the rack (%d)\n", node.info.Id, shards, ecb.replicaPlacement.SameRackCount)
+ if ecb.replicaPlacement != nil && shards > ecb.replicaPlacement.SameRackCount+1 {
+ details += fmt.Sprintf(" Skipped %s because shards %d > replica placement limit for the rack (%d + 1)\n", node.info.Id, shards, ecb.replicaPlacement.SameRackCount)
continue
}