diff options
| author | Trim21 <trim21.me@gmail.com> | 2024-11-24 14:43:08 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-23 22:43:08 -0800 |
| commit | fd6c787c02aae500b4b513d82501afe3179e6500 (patch) | |
| tree | 498c7de6ad197fede10973131ca96bef7e9ea043 | |
| parent | ccf1795e6f02de0b774ff542555f68468e25c556 (diff) | |
| download | seaweedfs-fd6c787c02aae500b4b513d82501afe3179e6500.tar.xz seaweedfs-fd6c787c02aae500b4b513d82501afe3179e6500.zip | |
fix EcVolumes sorting in volume UI (#6275)
* Update store_ec.go
* fix: EcVolume sorting not work
* use stdlib
* revert
| -rw-r--r-- | weed/storage/store_ec.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/weed/storage/store_ec.go b/weed/storage/store_ec.go index 8caaafc4d..6a20de6d0 100644 --- a/weed/storage/store_ec.go +++ b/weed/storage/store_ec.go @@ -3,13 +3,14 @@ package storage import ( "context" "fmt" - "github.com/seaweedfs/seaweedfs/weed/pb" - "golang.org/x/exp/slices" "io" "os" + "slices" "sync" "time" + "github.com/seaweedfs/seaweedfs/weed/pb" + "github.com/klauspost/reedsolomon" "github.com/seaweedfs/seaweedfs/weed/glog" @@ -405,7 +406,7 @@ func (s *Store) EcVolumes() (ecVolumes []*erasure_coding.EcVolume) { location.ecVolumesLock.RUnlock() } slices.SortFunc(ecVolumes, func(a, b *erasure_coding.EcVolume) int { - return int(b.VolumeId - a.VolumeId) + return int(a.VolumeId) - int(b.VolumeId) }) return ecVolumes } |
