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 EcVolumes sorting in volume UI (#6275)

Trim21fd6c787c02aa
diff --git a/weed/storage/store_ec.go b/weed/storage/store_ec.go
index 8caaafc4dd..6a20de6d02 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
}