diff --git a/weed/topology/data_node.go b/weed/topology/data_node.go index 07e00ac0a..f4ad0220c 100644 --- a/weed/topology/data_node.go +++ b/weed/topology/data_node.go @@ -2,6 +2,7 @@ package topology import ( "fmt" + "slices" "sync/atomic" "github.com/seaweedfs/seaweedfs/weed/glog" @@ -289,6 +290,8 @@ func (dn *DataNode) GetVolumeIds() string { ids = append(ids, int(k)) } + slices.Sort(ids) + return util.HumanReadableIntsMax(100, ids...) } diff --git a/weed/topology/disk.go b/weed/topology/disk.go index f27589916..fa99ef37a 100644 --- a/weed/topology/disk.go +++ b/weed/topology/disk.go @@ -2,6 +2,7 @@ package topology import ( "fmt" + "slices" "sync" "sync/atomic" @@ -298,5 +299,7 @@ func (d *Disk) GetVolumeIds() string { ids = append(ids, int(k)) } + slices.Sort(ids) + return util.HumanReadableIntsMax(100, ids...) }