Fix admin GUI list ordering on refresh (#7782)

Sort lists of filers, volume servers, masters, and message brokers
by address to ensure consistent ordering on page refresh.

This fixes the non-deterministic ordering caused by iterating over
Go maps with range.

Fixes #7781
This commit is contained in:
Chris Lu
2025-12-15 21:01:45 -08:00
committed by GitHub
parent 44cd07f835
commit 93499cd944
3 changed files with 31 additions and 7 deletions

View File

@@ -544,6 +544,11 @@ func (s *AdminServer) GetClusterVolumeServers() (*ClusterVolumeServersData, erro
volumeServers = append(volumeServers, *vs)
}
// Sort volume servers by address for consistent ordering on page refresh
sort.Slice(volumeServers, func(i, j int) bool {
return volumeServers[i].GetDisplayAddress() < volumeServers[j].GetDisplayAddress()
})
var totalCapacity int64
var totalVolumes int
for _, vs := range volumeServers {