Browse Source

Update disk_location_ec.go (#6359)

Add lock for l.ecVolumes
pull/6362/head
coffeecloudgit 6 days ago
committed by GitHub
parent
commit
c531e2eb0e
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      weed/storage/disk_location_ec.go

4
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

Loading…
Cancel
Save