ec.encode: Display a warning on EC balancing if no replica placement settings are found. (#6487)

This commit is contained in:
Lisandro Pin
2025-01-29 17:50:19 +01:00
committed by GitHub
parent 33ba88df9c
commit 7913681297
3 changed files with 53 additions and 12 deletions

View File

@@ -45,6 +45,10 @@ func NewReplicaPlacementFromByte(b byte) (*ReplicaPlacement, error) {
return NewReplicaPlacementFromString(fmt.Sprintf("%03d", b))
}
func (rp *ReplicaPlacement) HasReplication() bool {
return rp.DiffDataCenterCount != 0 || rp.DiffRackCount != 0 || rp.SameRackCount != 0
}
func (a *ReplicaPlacement) Equals(b *ReplicaPlacement) bool {
if a == nil || b == nil {
return false