diff options
Diffstat (limited to 'weed/storage/disk_location_ec.go')
| -rw-r--r-- | weed/storage/disk_location_ec.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/storage/disk_location_ec.go b/weed/storage/disk_location_ec.go index bb5738897..ac8d52fb7 100644 --- a/weed/storage/disk_location_ec.go +++ b/weed/storage/disk_location_ec.go @@ -195,6 +195,10 @@ func (l *DiskLocation) loadAllEcShards() (err error) { } func (l *DiskLocation) deleteEcVolumeById(vid needle.VolumeId) (e error) { + // Add write lock since we're modifying the ecVolumes map + l.ecVolumesLock.Lock() + defer l.ecVolumesLock.Unlock() + ecVolume, ok := l.ecVolumes[vid] if !ok { return |
