This reverts commit 2e5aa06026, reversing
changes made to 4d414f54a2.
This commit is contained in:
chrislu
2023-09-18 16:12:50 -07:00
parent 2e5aa06026
commit 8cb42c39ad
26 changed files with 123 additions and 235 deletions

View File

@@ -119,14 +119,14 @@ func eachDataNode(topo *master_pb.TopologyInfo, fn func(dc string, rack RackId,
}
func sortEcNodesByFreeslotsDescending(ecNodes []*EcNode) {
slices.SortFunc(ecNodes, func(a, b *EcNode) int {
return b.freeEcSlot - a.freeEcSlot
slices.SortFunc(ecNodes, func(a, b *EcNode) bool {
return a.freeEcSlot > b.freeEcSlot
})
}
func sortEcNodesByFreeslotsAscending(ecNodes []*EcNode) {
slices.SortFunc(ecNodes, func(a, b *EcNode) int {
return a.freeEcSlot - b.freeEcSlot
slices.SortFunc(ecNodes, func(a, b *EcNode) bool {
return a.freeEcSlot < b.freeEcSlot
})
}