diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2025-08-07 00:09:51 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-07 00:09:51 -0700 |
| commit | cde2d65c16f67c134dd152050eab62157bda1a5e (patch) | |
| tree | 6ebcc9dd5449992e76c1661d27ebe4eb31dd73fb /weed/shell/command_ec_common.go | |
| parent | b4d9618efc476443799f3700b5edf34fefee534a (diff) | |
| download | seaweedfs-cde2d65c16f67c134dd152050eab62157bda1a5e.tar.xz seaweedfs-cde2d65c16f67c134dd152050eab62157bda1a5e.zip | |
ec candidate selection needs to adjust same rack count compare (#7106)
ec needs to adjust same rack count compare
Diffstat (limited to 'weed/shell/command_ec_common.go')
| -rw-r--r-- | weed/shell/command_ec_common.go | 4 |
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 } |
