Skip to content

Commit

Permalink
fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislusf committed Nov 21, 2024
1 parent 1c143cf commit 75f5afa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions weed/storage/store_ec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 75f5afa

Please sign in to comment.