diff --git a/weed/storage/disk_location.go b/weed/storage/disk_location.go index 9ecc57459..c309b3f92 100644 --- a/weed/storage/disk_location.go +++ b/weed/storage/disk_location.go @@ -174,9 +174,6 @@ func (l *DiskLocation) DeleteCollectionFromDiskLocation(collection string) (e er } func (l *DiskLocation) deleteVolumeById(vid needle.VolumeId) (found bool, e error) { - l.volumesLock.Lock() - defer l.volumesLock.Unlock() - v, ok := l.volumes[vid] if !ok { return diff --git a/weed/storage/store.go b/weed/storage/store.go index 48cbeb3d1..d5d59235a 100644 --- a/weed/storage/store.go +++ b/weed/storage/store.go @@ -380,10 +380,12 @@ func (s *Store) DeleteVolume(i needle.VolumeId) error { Ttl: v.Ttl.ToUint32(), } for _, location := range s.Locations { - if found, err := location.deleteVolumeById(i); found && err == nil { + if err := location.DeleteVolume(i); err == nil { glog.V(0).Infof("DeleteVolume %d", i) s.DeletedVolumesChan <- message return nil + } else { + glog.Errorf("DeleteVolume %d: %v", i, err) } }