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 compilation

chrislu75f5afa5716c
diff --git a/weed/storage/store_ec.go b/weed/storage/store_ec.go
index 014a870dbe..8caaafc4dd 100644
--- a/weed/storage/store_ec.go
+++ b/weed/storage/store_ec.go
@@ -201,8 +201,9 @@ func (s *Store) readOneEcShardInterval(needleId types.NeedleId, ecVolume *erasur
shardId, actualOffset := interval.ToShardIdAndOffset(erasure_coding.ErasureCodingLargeBlockSize, erasure_coding.ErasureCodingSmallBlockSize)
data = make([]byte, interval.Size)
if shard, found := ecVolume.FindEcVolumeShard(shardId); found {
- if n, err = shard.ReadAt(data, actualOffset); err != nil {
- if n != interval.Size {
+ var readSize int
+ if readSize, err = shard.ReadAt(data, actualOffset); err != nil {
+ if readSize != int(interval.Size) {
glog.V(0).Infof("read local ec shard %d.%d offset %d: %v", ecVolume.VolumeId, shardId, actualOffset, err)
return
}