diff options
Diffstat (limited to 'weed/storage/store_ec.go')
| -rw-r--r-- | weed/storage/store_ec.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/weed/storage/store_ec.go b/weed/storage/store_ec.go index b46803fb2..484ad3aad 100644 --- a/weed/storage/store_ec.go +++ b/weed/storage/store_ec.go @@ -116,6 +116,17 @@ func (s *Store) FindEcVolume(vid needle.VolumeId) (*erasure_coding.EcVolume, boo return nil, false } +// shardFiles is a list of shard files, which is used to return the shard locations +func (s *Store) CollectEcShards(vid needle.VolumeId, shardFileNames []string) (ecVolume *erasure_coding.EcVolume, found bool) { + for _, location := range s.Locations { + if s, found := location.CollectEcShards(vid, shardFileNames); found { + ecVolume = s + found = true + } + } + return +} + func (s *Store) DestroyEcVolume(vid needle.VolumeId) { for _, location := range s.Locations { location.DestroyEcVolume(vid) |
