mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-11-24 08:46:54 +08:00
Revert "Merge branch 'master' of https://github.com/seaweedfs/seaweedfs"
This reverts commit2e5aa06026, reversing changes made to4d414f54a2.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
"github.com/seaweedfs/seaweedfs/weed/storage/types"
|
||||
"github.com/seaweedfs/seaweedfs/weed/util"
|
||||
"golang.org/x/exp/slices"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -70,8 +69,8 @@ func (r *Rack) ToInfo() (info RackInfo) {
|
||||
dns = append(dns, dn.ToInfo())
|
||||
}
|
||||
|
||||
slices.SortFunc(dns, func(a, b DataNodeInfo) int {
|
||||
return strings.Compare(a.Url, b.Url)
|
||||
slices.SortFunc(dns, func(a, b DataNodeInfo) bool {
|
||||
return a.Url < b.Url
|
||||
})
|
||||
|
||||
info.DataNodes = dns
|
||||
|
||||
@@ -3,7 +3,6 @@ package topology
|
||||
import (
|
||||
"github.com/seaweedfs/seaweedfs/weed/pb/master_pb"
|
||||
"golang.org/x/exp/slices"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type TopologyInfo struct {
|
||||
@@ -22,8 +21,8 @@ func (t *Topology) ToInfo() (info TopologyInfo) {
|
||||
dcs = append(dcs, dc.ToInfo())
|
||||
}
|
||||
|
||||
slices.SortFunc(dcs, func(a, b DataCenterInfo) int {
|
||||
return strings.Compare(string(a.Id), string(b.Id))
|
||||
slices.SortFunc(dcs, func(a, b DataCenterInfo) bool {
|
||||
return a.Id < b.Id
|
||||
})
|
||||
|
||||
info.DataCenters = dcs
|
||||
|
||||
Reference in New Issue
Block a user