aboutsummaryrefslogtreecommitdiff
path: root/weed
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2024-11-21 00:41:22 -0800
committerchrislu <chris.lu@gmail.com>2024-11-21 00:41:22 -0800
commit75f5afa5716caff22ae4d1ee13cb050f70f062e3 (patch)
tree14d1910d7fa4373d1b7c0cdc042cc073b5ed2a49 /weed
parent1c143cfcea8c68c0e9ca762931be0b43dc003f76 (diff)
downloadseaweedfs-75f5afa5716caff22ae4d1ee13cb050f70f062e3.tar.xz
seaweedfs-75f5afa5716caff22ae4d1ee13cb050f70f062e3.zip
fix compilation
Diffstat (limited to 'weed')
-rw-r--r--weed/storage/store_ec.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/weed/storage/store_ec.go b/weed/storage/store_ec.go
index 014a870db..8caaafc4d 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
}