Revert "Revert "Merge branch 'master' of https://github.com/seaweedfs/seaweedfs""
This reverts commit 8cb42c39
This commit is contained in:
@@ -3,6 +3,7 @@ package topology
|
||||
import (
|
||||
"github.com/seaweedfs/seaweedfs/weed/pb/master_pb"
|
||||
"golang.org/x/exp/slices"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type DataCenter struct {
|
||||
@@ -46,8 +47,8 @@ func (dc *DataCenter) ToInfo() (info DataCenterInfo) {
|
||||
racks = append(racks, rack.ToInfo())
|
||||
}
|
||||
|
||||
slices.SortFunc(racks, func(a, b RackInfo) bool {
|
||||
return a.Id < b.Id
|
||||
slices.SortFunc(racks, func(a, b RackInfo) int {
|
||||
return strings.Compare(string(a.Id), string(b.Id))
|
||||
})
|
||||
info.Racks = racks
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user