Introduce logic to resolve volume replica placement within EC rebalancing. (#6254)

* Rename `command_ec_encode_test.go` to `command_ec_common_test.go`.

All tests defined in this file are now for `command_ec_common.go`.

* Minor code cleanups.

- Fix broken `ec.balance` test.
- Rework integer ceiling division to not use floats, which can introduce precision errors.

* Introduce logic to resolve volume replica placement within EC rebalancing.

This will be used to make rebalancing logic topology-aware.

* Give shell.EcNode.dc a dedicated DataCenterId type.
This commit is contained in:
Lisandro Pin
2024-11-19 03:05:06 +01:00
committed by GitHub
parent 7b3c0e937f
commit f2db746690
5 changed files with 141 additions and 58 deletions

View File

@@ -129,7 +129,7 @@ func newEcNode(dc string, rack string, dataNodeId string, freeEcSlot int) *EcNod
Id: dataNodeId,
DiskInfos: make(map[string]*master_pb.DiskInfo),
},
dc: dc,
dc: DataCenterId(dc),
rack: RackId(rack),
freeEcSlot: freeEcSlot,
}