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.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
perf(weed/topology): preallocate the per-disk VolumeList payload (#10614)
Chris Lu9f1e21e73f2b
diff --git a/weed/topology/disk.go b/weed/topology/disk.goindex f2bd0f9f2f..cec5ffe288 100644--- a/weed/topology/disk.go+++ b/weed/topology/disk.go@@ -311,9 +311,11 @@ func (d *Disk) ToDiskInfo() *master_pb.DiskInfo {DiskTotalBytes: uint64(max(0, diskUsage.diskTotalBytes)),DiskFreeBytes: uint64(max(0, diskUsage.diskFreeBytes)),}+ m.VolumeInfos = make([]*master_pb.VolumeInformationMessage, 0, len(volumes))for _, v := range volumes {m.VolumeInfos = append(m.VolumeInfos, v.ToVolumeInformationMessage())}+ m.EcShardInfos = make([]*master_pb.VolumeEcShardInformationMessage, 0, len(ecShards))for _, ecv := range ecShards {m.EcShardInfos = append(m.EcShardInfos, ecv.ToVolumeEcShardInformationMessage())}