diff --git a/weed/topology/data_node.go b/weed/topology/data_node.go index 8c013f001..8c8a43343 100644 --- a/weed/topology/data_node.go +++ b/weed/topology/data_node.go @@ -2,7 +2,6 @@ package topology import ( "fmt" - "slices" "sync/atomic" "github.com/seaweedfs/seaweedfs/weed/glog" @@ -392,28 +391,3 @@ func (dn *DataNode) UpdateDiskTags(tags []*master_pb.DiskTag) { dn.diskMetas = metas dn.Unlock() } - -// GetVolumeIds returns the human readable volume ids limited to count of max 100. -func (dn *DataNode) GetVolumeIds() string { - dn.RLock() - defer dn.RUnlock() - existingVolumes := dn.getVolumes() - ids := make([]int, 0, len(existingVolumes)) - - for k := range existingVolumes { - ids = append(ids, int(k)) - } - - slices.Sort(ids) - - return util.HumanReadableIntsMax(100, ids...) -} - -func (dn *DataNode) getVolumes() []storage.VolumeInfo { - var existingVolumes []storage.VolumeInfo - for _, c := range dn.children { - disk := c.(*Disk) - existingVolumes = append(existingVolumes, disk.GetVolumes()...) - } - return existingVolumes -}