volume: avoid deadlock when deleting volumes

fix https://github.com/chrislusf/seaweedfs/issues/1501
This commit is contained in:
Chris Lu
2020-10-01 07:10:03 -07:00
parent a34bad2cee
commit a1c01d716b
2 changed files with 3 additions and 4 deletions

View File

@@ -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