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

@@ -3,7 +3,6 @@ package topology
import (
"github.com/seaweedfs/seaweedfs/weed/pb/master_pb"
"golang.org/x/exp/slices"
"strings"
)
type DataCenter struct {
@@ -47,8 +46,8 @@ func (dc *DataCenter) ToInfo() (info DataCenterInfo) {
racks = append(racks, rack.ToInfo())
}
slices.SortFunc(racks, func(a, b RackInfo) int {
return strings.Compare(string(a.Id), string(b.Id))
slices.SortFunc(racks, func(a, b RackInfo) bool {
return a.Id < b.Id
})
info.Racks = racks
return