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: volume.list volume info output not in order (#6737)

NyaMisty8d0e6f1ead81
diff --git a/weed/shell/command_volume_list.go b/weed/shell/command_volume_list.go
index 99fd1420b6..208ef727d5 100644
--- a/weed/shell/command_volume_list.go
+++ b/weed/shell/command_volume_list.go
@@ -190,7 +190,7 @@ func (c *commandVolumeList) writeDiskInfo(writer io.Writer, t *master_pb.DiskInf
diskType = types.HddType
}
slices.SortFunc(t.VolumeInfos, func(a, b *master_pb.VolumeInformationMessage) int {
- return int(a.Id - b.Id)
+ return int(a.Id) - int(b.Id)
})
volumeInfosFound := false
for _, vi := range t.VolumeInfos {