Browse Source
ec candidate selection needs to adjust same rack count compare (#7106 )
ec needs to adjust same rack count compare
pull/7109/head
Chris Lu
2 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
2 deletions
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
}