aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNyaMisty <misty@misty.moe>2025-04-27 23:52:49 +0800
committerGitHub <noreply@github.com>2025-04-27 08:52:49 -0700
commit8d0e6f1ead815def7230ac8c41c9933f093e0b7b (patch)
treee8031e206b46cccc914d098ad3a9eff50b5d06ec
parentc8b0a04409dd28f733730d1e9cfe703778e95a72 (diff)
downloadseaweedfs-8d0e6f1ead815def7230ac8c41c9933f093e0b7b.tar.xz
seaweedfs-8d0e6f1ead815def7230ac8c41c9933f093e0b7b.zip
fix: volume.list volume info output not in order (#6737)
-rw-r--r--weed/shell/command_volume_list.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/shell/command_volume_list.go b/weed/shell/command_volume_list.go
index 99fd1420b..208ef727d 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 {