ec volume support deletes

This commit is contained in:
Chris Lu
2019-06-19 22:57:14 -07:00
parent 115558e5f5
commit 856da7aae2
6 changed files with 162 additions and 17 deletions

View File

@@ -15,6 +15,7 @@ import (
"github.com/chrislusf/seaweedfs/weed/stats"
"github.com/chrislusf/seaweedfs/weed/storage/erasure_coding"
"github.com/chrislusf/seaweedfs/weed/storage/needle"
"github.com/chrislusf/seaweedfs/weed/storage/types"
"github.com/klauspost/reedsolomon"
)
@@ -130,6 +131,9 @@ func (s *Store) ReadEcShardNeedle(ctx context.Context, vid needle.VolumeId, n *n
if err != nil {
return 0, fmt.Errorf("locate in local ec volume: %v", err)
}
if size == types.TombstoneFileSize {
return 0, fmt.Errorf("entry %s is deleted", n.Id)
}
glog.V(4).Infof("read ec volume %d offset %d size %d intervals:%+v", vid, offset.ToAcutalOffset(), size, intervals)