diff options
| author | Trim21 <trim21.me@gmail.com> | 2025-12-08 23:55:42 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-08 07:55:42 -0800 |
| commit | 0a0eb21b860b272d5d36585717f16db5b79dbbdd (patch) | |
| tree | 427f916c2fbdb1c19f1f26d1c5182f33953ed198 | |
| parent | 805950b401f9bf52424a6788c239d42dc6e1c666 (diff) | |
| download | seaweedfs-0a0eb21b860b272d5d36585717f16db5b79dbbdd.tar.xz seaweedfs-0a0eb21b860b272d5d36585717f16db5b79dbbdd.zip | |
fix random volume ids in master.html (#7655)
| -rw-r--r-- | weed/topology/data_node.go | 3 | ||||
| -rw-r--r-- | weed/topology/disk.go | 3 |
2 files changed, 6 insertions, 0 deletions
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...) } |
