mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-27 20:59:42 +08:00
fix EcVolumes sorting in volume UI (#6275)
* Update store_ec.go * fix: EcVolume sorting not work * use stdlib * revert
This commit is contained in:
parent
ccf1795e6f
commit
fd6c787c02
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user