Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

fix random volume ids in master.html (#7655)

Trim210a0eb21b860b
diff --git a/weed/topology/data_node.go b/weed/topology/data_node.go
index 07e00ac0a4..f4ad0220c3 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 f275899166..fa99ef37a0 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...)
}